from appium import webdriver
import time
desired_caps = {
"paltformName":"Android",
"paltformVersion":"7.1.2",
"deviceName":"xiaomi",
"appPackage":"com.luhaisco.dywl",
"appActivity":"com.luhaisco.dywl.StartActivity",
"noReset":True
}
#2. appium server 进行启动
#3 发送指令给appium server
dirver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_caps)
Traceback (most recent call last):
File "C:/D2018/app自动化工程/lianxi/first_app.py", line 13, in
dirver = webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_caps)
File "C:\D2018\app自动化工程\venv\lib\site-packages\appium\webdriver\webdriver.py", line 235, in init
options=options,
File "C:\D2018\app自动化工程\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 270, in init
self.start_session(capabilities, browser_profile)
File "C:\D2018\app自动化工程\venv\lib\site-packages\appium\webdriver\webdriver.py", line 320, in start_session
response = self.execute(RemoteCommand.NEW_SESSION, w3c_caps)
File "C:\D2018\app自动化工程\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 428, in execute
self.error_handler.check_response(response)
File "C:\D2018\app自动化工程\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 243, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: 'platformName' can't be blank
Stacktrace:
InvalidArgumentError: 'platformName' can't be blank