TestProject Forum
Powered by leading experts in the test automation community

Appium cannot perform APP operations on the emulator

You can run appium by yourself, but you can’t run it through Testproject.

from src.testproject.sdk.drivers import webdriver
#用來等待元素控件 (WebDiverWait)
from selenium.webdriver.support.ui import WebDriverWait
from time import sleep

caps = {}
caps[‘deviceName’] = ‘’ #adb devices連接之設備成稱
caps[‘platformName’] = ‘Android’ #作業系統
caps[‘platformVersion’] = ‘5.1.1’ #系統版本
caps[‘appPackage’] = ‘com.momo.mobile.shoppingv2.android’ #預自動化連接APP的包
caps[‘appActivity’] = ‘.modules.home.v2.HomeActivity’ #預自動化連接APP的活動
driver = webdriver.Remote(desired_capabilities=caps)
element = WebDriverWait(driver, 10).until(
lambda x: x.find_element_by_id(‘com.momo.mobile.shoppingv2.android:id/md_buttonDefaultPositive’))


my code

This is the simulator I originally executed

Hello, like we discussed over in the chat, the main issue here is the SDK returns the incorrect message if the device is not found, I have opened an issue on that.