请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

启动之后报错了

Traceback (most recent call last):
File "E:\wnagchen\case\start_appium.py", line 9, in <module>
webdriver.Remote("http://127.0.0.1:4723/wd/hub",capabilities)
File "C:\Users\wangchen404\AppData\Local\Programs\Python\Python38\lib\site-packages\appium\webdriver\webdriver.py", line 151, in __init__
super().__init__(
File "C:\Users\wangchen404\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Users\wangchen404\AppData\Local\Programs\Python\Python38\lib\site-packages\appium\webdriver\webdriver.py", line 225, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, parameters)
File "C:\Users\wangchen404\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:\Users\wangchen404\AppData\Local\Programs\Python\Python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, 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: pkg, and activity or intent action, are required to start an application

[Finished in 9.6s with exit code 1]
[shell_cmd: python -u "E:\wnagchen\case\start_appium.py"]
[dir: E:\wnagchen\case]
[path: D:\python\Scripts\;D:\python\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Users\wangchen404\AppData\Local\Microsoft\WindowsApps%JAVA_HOME%\bin;C:\Program Files (x86)\Java\jdk1.8.0_251\bin;C:\Program Files\Android\android-sdk\platform-tools;C:\Program Files\Android\android-sdk\tools;C:\Users\wangchen404\AppData\Roaming\npm;C:\Users\wangchen404\AppData\Roaming\npm\node_modules\.staging\ap

正在回答 回答被采纳积分+3

1回答

Mushishi 2020-07-09 10:45:03

代码也发一下,确定一下你activity以及package对不对:An unknown server-side error occurred while processing the command. Original error: pkg, and activity or intent action, are required to start an application。还有一定要把appium得日志发一下。

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信