Я пытаюсь определить задержку запуска приложения настроек непосредственно с сервера 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