本地浏览器可以打开链接执行用例打不开

提问 6 69
binbin
binbin LV2 1月26日 11:12 编辑
<p id="descriptionP"><p><img src="http://talk-cdn.liumatest.cn/131df65e-c5a6-4eac-8933-1c48e1294f99.jpeg" style="max-width: 100%;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-01-25 11:33:42.554940 - Debug - WEB操作[打开网页]开始</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-01-25 11:35:15.516281 - Error - 无法打开 'https://58.33.84.122:50030/admin/'</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-01-25 11:35:15.516317 - Debug - WEB操作[打开网页]结束</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-01-25 11:35:15.539578 - Error - Message: java.net.ConnectException: Connection refused (Connection refused) Stacktrace: at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0 (WebDriverServlet.java:240) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">2024-01-25 11:35:15.544137 - Error - 程序错误信息:</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">Traceback (most recent call last):</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 57, in loop_execute step.execute()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/teststep.py", line 39, in execute self.result = func(self.test, self.driver, **opt_content)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/find_opt.py", line 62, in open_url Browser(test, driver).open_url(kwargs["data"]["domain"], kwargs["data"]["path"])</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/driver/browserOpt.py", line 131, in open_url raise e</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/driver/browserOpt.py", line 126, in open_url self.driver.get(url)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 333, in get self.execute(Command.GET, {'url': url})</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">selenium.common.exceptions.WebDriverException: Message: java.net.ConnectException: Connection refused (Connection refused) Stacktrace: at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0 (WebDriverServlet.java:240) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">During handling of the above exception, another exception occurred:</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">Traceback (most recent call last):</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 30, in execute self.loop_execute(self.case_message['optList'], [])</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 63, in loop_execute self.test.saveScreenShot(opt_content['operationTrans'], self.driver.get_screenshot_as_png())</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1064, in get_screenshot_as_png return base64.b64decode(self.get_screenshot_as_base64().encode('ascii'))</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 1074, in get_screenshot_as_base64 return self.execute(Command.SCREENSHOT)['value']</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">selenium.common.exceptions.WebDriverException: Message: java.net.ConnectException: Connection refused (Connection refused) Stacktrace: at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0 (WebDriverServlet.java:240) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">During handling of the above exception, another exception occurred:</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">Traceback (most recent call last):</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/unittest/case.py", line 60, in testPartExecutor yield</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/unittest/case.py", line 676, in run self._callTestMethod(testMethod)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/unittest/case.py", line 633, in _callTestMethod method()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/lm/lm_case.py", line 29, in testEntrance WebTestCase(test=self).execute()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 32, in execute self.after_execute()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/liuma/core/web/testcase.py", line 123, in after_execute self.driver.quit()</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 698, in quit self.execute(Command.QUIT)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace)</span><br style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;"><span style="color: rgb(96, 98, 102); font-family: Avenir, Helvetica, Arial, sans-serif;">selenium.common.exceptions.WebDriverException: Message: java.net.ConnectException: Connection refused (Connection refused) Stacktrace: at org.openqa.selenium.remote.server.WebDriverServlet.lambda$handle$0 (WebDriverServlet.java:240) at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:511) at java.util.concurrent.FutureTask.run (FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624) at java.lang.Thread.run (Thread.java:748)</span><br></p><p>以上是报错信息,我打开的网址在我本地浏览器可以打开,但是执行用例时却不能打开,只有这个链接是这样,希望能够得到大家的帮助解答</p></p><p><br></p>
收藏(0)  分享
相关标签: 提问
注意:本文归作者所有,未经作者允许,不得转载
6个回复
  • Chras-fu
    1月26日 07:45
    你这个链接为什么是https,但是连域名都没有。感觉是证书配置问题,你得带着证书启动浏览器
    0 2
  • Chras-fu
    1月26日 11:11
    填在这个位置上,用例里引用这个驱动配置 img[http://talk-cdn.liumatest.cn/c1b0af51-68e0-4e2f-8734-a3f54a7d1bfd.png]
    0 2