【问题标题】:Automating hybrid app (android) with appium using python使用python使用appium自动化混合应用程序(android)
【发布时间】:2018-03-08 20:07:15
【问题描述】:

我正在为使用 ionic 框架创建的混合 android 应用程序编写自动化测试。但在运行测试期间,我无法使用其活动启动应用程序。这是错误

selenium.common.exceptions.WebDriverException:消息:未知 处理命令时发生服务器端错误。原来的 错误:启动应用程序时发生错误。原始错误:使用的活动 启动应用程序不存在或无法启动!确保它存在 并且是一个可启动的活动

这是我想要的功能代码........

class TestLoginLogout(unittest.TestCase):
    @classmethod
    def setUpClass(self):
        desired_caps = {}
        desired_caps['platformName'] = 'Android'
        desired_caps['platformVersion'] = '7.0'
        desired_caps['deviceName'] = 'ZY223XQMWZ'
        desired_caps['app'] = PATH('/home/martial/DYFO/dyfo.apk')
        desired_caps['appPackage'] = 'dyfolabs.automatioo'
        desired_caps['appActivity'] = "dyfolabs.automation.MainActivity"
        desired_caps['context'] = 'WEBVIEW'
        desired_caps['noReset'] = 'true'
        desired_caps['fullReset'] = 'false'
        self.driver = webdriver.Remote('http://0.0.0.0:4723/wd/hub', desired_caps)

请帮助我,我被困在这里。提前谢谢..

【问题讨论】:

    标签: python automation appium hybrid-mobile-app


    【解决方案1】:

    从这里下载 selenium for python:https://www.seleniumhq.org/download/ 和 appium for python 从这里:http://appium.io/downloads.html

    将这些添加到您的项目中,然后重试

    【讨论】:

      猜你喜欢
      • 2014-09-25
      • 2019-05-01
      • 1970-01-01
      • 2015-12-20
      • 1970-01-01
      • 2018-04-18
      • 1970-01-01
      • 1970-01-01
      • 2016-01-14
      相关资源
      最近更新 更多