Решил изучить автоматизацию, использую Python, Appium, Selenium web.driver и Android Studio для эмуляции андроид устройства.
Приложение загружается на устройстве,но не не происходит нажатие клавиши... Уже перепробовал много чего,но проблему решить не могу.
Использую
UI Automator для получения resource_id и использования его.
Сам код:
from appium import webdriver
from selenium.webdriver.common.by import By
desired_capabilities = {
"platformName": "Android",
"platformVersion": "9",
"deviceName": "Android Emulator",
"app": "C:/Users/Vladislav/PycharmProjects/Appium test/app_binaries/Wikipedia_v2.7.50324-r-2020-06-29_apkpure.com.apk",
}
driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_capabilities=desired_capabilities)
driver.implicitly_wait(1)
driver.find_element_by_id("org.wikipedia:id/fragment_onboarding_skip_button").click()
Ошибка:
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 'org.wikipedia' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: 'org.wikipedia.main.MainActivity' or 'org.wikipedia.org.wikipedia.main.MainActivity' never started. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting
Консоль Appium:
Event 'newSessionStarted' logged at 1594738341179 (17:52:21 GMT+0300 (Москва, стандартное время))
[W3C] Encountered internal error running command: Error: Cannot start the 'org.wikipedia' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: 'org.wikipedia.main.MainActivity' or 'org.wikipedia.org.wikipedia.main.MainActivity' never started. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting
[W3C] at ADB.startApp (C:\Program Files\Appium\resources\app\node_modules\appium\node_modules\appium-adb\lib\tools\apk-utils.js:165:11)
[W3C] Destroying socket connection
[HTTP] <-- POST /wd/hub/session 500 27672 ms - 1409
[HTTP]
[Instrumentation] .
[Instrumentation] Time: 24.062
[Instrumentation]
[Instrumentation] OK (1 test)
[Instrumentation] The process has exited with code 0