【问题标题】:Launch an mobile app on emulator using appium使用 appium 在模拟器上启动移动应用程序
【发布时间】:2016-08-08 20:00:32
【问题描述】:

我想使用 Appium - Java 在genemotion 中启动我的应用程序。

我可以在真机上启动应用程序,但我觉得使用模拟器而不是真机更好。我该怎么做?

【问题讨论】:

    标签: java selenium appium


    【解决方案1】:

    只需在 Genemotion 上添加一个虚拟模拟器,使其启动并运行。然后打开你的终端并输入: 亚行设备

    它会显示, 连接的设备列表,确保新的虚拟设备正在某个端口上运行。即:192.168.56.101:5555 设备

    现在使用下面使用所需的功能,如下所示:

    DesiredCapabilities 能力 = new DesiredCapabilities();

        capabilities.setCapability("deviceName", "Name of the Emulator");
    
        capabilities.setCapability("platformName", "Android");
    
        driver = new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
    

    它将在genemotion中启动apk。

    【讨论】:

      猜你喜欢
      • 2017-10-31
      • 2015-10-14
      • 2014-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-31
      • 2011-05-11
      相关资源
      最近更新 更多