前言:
今天在运行Appium的第一个项目就遇到了报错,吓得我赶紧来写篇博客压压惊。
报错截图:
Appium端
pycharm端
具体报错如下:
Traceback (most recent call last):
File "C:\Users\23052204\PycharmProjects\pythonProject\AuToSDK\robotdemo\appiumdemo.py", line 13, in <module>
driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23052204\PycharmProjects\pythonProject\venv\Lib\site-packages\appium\webdriver\webdriver.py", line 257, in __init__
super().__init__(
File "C:\Users\23052204\PycharmProjects\pythonProject\venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in __init__
self.start_session(capabilities)
File "C:\Users\23052204\PycharmProjects\pythonProject\venv\Lib\site-packages\appium\webdriver\webdriver.py", line 346, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\23052204\PycharmProjects\pythonProject\venv\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute
self.error_handler.check_response(response)
File "C:\Users\23052204\PycharmProjects\pythonProject\venv\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.baidu.BaiduMap' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the 'com.baidu.BaiduMap' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name './com.baidu.baidumaps.MapsActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
Stacktrace:
UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.baidu.BaiduMap' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Cannot start the 'com.baidu.BaiduMap' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Activity name './com.baidu.baidumaps.MapsActivity' used to start the app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity
at getResponseForW3CError (C:\I\Install\Appium\Appium-Server-GUI-windows-1.22.0\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\errors.js:804:9)
at asyncHandler (C:\I\Install\Appium\Appium-Server-GUI-windows-1.22.0\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\protocol\protocol.js:380:37)
Process finished with exit code 1