WEB UI的测试用例执行报错
<p>web UI操作用例执行时,报以下错误,如何解决呢?</p><p>MMessage: 'hub' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home</p><p>程序错误信息: <br>Traceback (most recent call last):<br> File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start<br> self.process = subprocess.Popen(cmd, env=self.env,<br> File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__<br> self._execute_child(args, executable, preexec_fn, close_fds,<br> File "/usr/local/lib/python3.8/subprocess.py", line 1720, in _execute_child<br> raise child_exception_type(errno_num, err_msg, err_filename)<br>FileNotFoundError: [Errno 2] No such file or directory: 'http://192.168.100.241:4444/wd/hub'<br><br>During handling of the above exception, another exception occurred:<br><br>Traceback (most recent call last):<br> File "/usr/local/lib/python3.8/unittest/case.py", line 60, in testPartExecutor<br> yield<br> File "/usr/local/lib/python3.8/unittest/case.py", line 676, in run<br> self._callTestMethod(testMethod)<br> File "/usr/local/lib/python3.8/unittest/case.py", line 633, in _callTestMethod<br> method()<br> File "/liuma/lm/lm_case.py", line 29, in testEntrance<br> WebTestCase(test=self).execute()<br> File "/liuma/core/web/testcase.py", line 22, in __init__<br> self.driver = self.before_execute()<br> File "/liuma/core/web/testcase.py", line 126, in before_execute<br> return webdriver.Chrome(executable_path=self.test.driver.browser_path, options=opt)<br> File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__<br> self.service.start()<br> File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start<br> raise WebDriverException(<br>selenium.common.exceptions.WebDriverException: Message: 'hub' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home<br></p>
收藏(0)
分享
相关标签:
注意:本文归作者所有,未经作者允许,不得转载