Driver.launch_app()未在python脚本中启动应用程序

2024-10-01 02:37:03 发布

您现在位置:Python中文网/ 问答频道 /正文

目前开始使用python和appium自动化。我做了一些研究,并开始连接设备,但连接设备后,我的应用程序无法启动。我的脚本如下:

from appium import webdriver

url = 'http://jq.deviceconnect.com/Appium'
caps = {
    'gigafox:UserName': 'admin',
    'gigafox:ApiKey': '####',
    'gigafox:application': 'com.google.android.youtube/com.google.
     android.apps.youtube.app.application.Shell$HomeActivity',
    'newCommandTimeout': 600000,
    'gigafox:device': '58d5251c-89cd-4f7a-b2f1-8f316e292e0b',
    'gigafox:SkipInstall': 'true',
    'automationName': 'UIAutimator2'
}

# Start Appium session
print('creating Appium session')
driver = webdriver.Remote(url, caps)
driver.launch_app() 

运行此操作后,我的设备已连接到,但我的应用程序未启动,构建完成。没有错误,所以我假设除了如何实现它之外,没有其他错误


Tags: comapp应用程序urlapplicationyoutubesessiondriver
1条回答
网友
1楼 · 发布于 2024-10-01 02:37:03

根据GigaFox文档,单击here

Upload the app to GigaFox and use the bundleId (iOS) or appPackage and appActivity capabilities, per Appium documentation, to direct launch the app. GigaFox will install the app using its own content storage system and install code, enforcing ACLs as relevant.

有关Appium所需功能的更多信息,请参见here

相关问题 更多 >