我试图直接从appium
服务器查找设置应用程序的启动延迟
请您帮助我了解用python捕获细节的代码
以下是我的密码:-
from appium import webdriver
desired_cap = {
"platformName": "Android",
"platformVersion": "10.0",
"deviceName": "1000686d",
"automationName": "Appium",
"appPackage": "com.android.settings",
"appActivity": "com.android.settings.Settings",
"newCommandTimeout": "600",
"autoLaunch": "false", #this will not launch the app by itself so that we can measure the launch latency in a controlled way.
"eventTimings": "true"
}
driver = webdriver.Remote("http://localhost:4723/wd/hub",desired_cap)
print ("Launching Settings")
driver.start_activity("com.android.settings", "com.android.settings.Settings");
server_events = driver.getEvents()
输出:-
Launching Settings
Traceback (most recent call last):
File "C:/Users/Vinay/Desktop/Python/V2/Session_2/Launch_Latency.py", line 21, in <module>
server_events = driver.getEvents()
AttributeError: 'WebDriver' object has no attribute 'getEvents'
Process finished with exit code 1
目前没有回答
相关问题 更多 >
编程相关推荐