我启动appium客户端执行用例没有报错,
然后我通过dos命令执行用例却报错
Traceback (most recent call last):
File “D:\software_pakage\pthyon\PyCharm Community Edition 2018.3.2\helpers\pydev\pydevd.py”, line 1741, in
main()
File “D:\software_pakage\pthyon\PyCharm Community Edition 2018.3.2\helpers\pydev\pydevd.py”, line 1735, in main
globals = debugger.run(setup[‘file’], None, None, is_module)
File “D:\software_pakage\pthyon\PyCharm Community Edition 2018.3.2\helpers\pydev\pydevd.py”, line 1135, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File “D:\software_pakage\pthyon\PyCharm Community Edition 2018.3.2\helpers\pydev_pydev_imps_pydev_execfile.py”, line 18, in execfile
exec(compile(contents+"\n", file, ‘exec’), glob, loc)
File “D:/lishaohui/learn_appium/venv/bussiness/login_bussiness.py”, line 31, in
lb.login()
File “D:/lishaohui/learn_appium/venv/bussiness/login_bussiness.py”, line 8, in login
self.hl.jump_to_homepage()
File “D:\lishaohui\learn_appium\venv\handle\login_handle.py”, line 11, in jump_to_homepage
WebDriverWait(self.driver,10).until(EC.presence_of_element_located((By.ID,“com.tianyuyou.shop:id/b5”)))
File “D:\lishaohui\learn_appium\venv\lib\site-packages\selenium\webdriver\support\wait.py”, line 71, in until
value = method(self._driver)
File “D:\lishaohui\learn_appium\venv\lib\site-packages\selenium\webdriver\support\expected_conditions.py”, line 64, in call
return _find_element(driver, self.locator)
File “D:\lishaohui\learn_appium\venv\lib\site-packages\selenium\webdriver\support\expected_conditions.py”, line 415, in _find_element
raise e
File “D:\lishaohui\learn_appium\venv\lib\site-packages\selenium\webdriver\support\expected_conditions.py”, line 411, in _find_element
return driver.find_element(*by)
File “D:\lishaohui\learn_appium\venv\lib\site-packages\appium\webdriver\webdriver.py”, line 276, in find_element
’value’: value})[‘value’]
File “D:\lishaohui\learn_appium\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py”, line 321, in execute
self.error_handler.check_response(response)
File “D:\lishaohui\learn_appium\venv\lib\site-packages\appium\webdriver\errorhandler.py”, line 29, in check_response
raise wde
File “D:\lishaohui\learn_appium\venv\lib\site-packages\appium\webdriver\errorhandler.py”, line 24, in check_response
super(MobileErrorHandler, self).check_response(response)
File “D:\lishaohui\learn_appium\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py”, line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidSessionIdException: Message: A session is either terminated or not started
百度无解。。。