简体   繁体   English

使用appium在模拟器上启动移动应用

[英]Launch an mobile app on emulator using appium

I wanted to launch my app in genemotion using Appium - Java. 我想使用Appium-Java在Genemotion中启动我的应用程序。

I can launch the app on real device, But I feel its better to use Emulators instead of real devices. 我可以在真实设备上启动该应用程序,但是我觉得最好使用模拟器而不是真实设备。 How I can do that ? 我该怎么做?

Just add a Virtual Emulator on Genemotion, make it up and running. 只需在Genemotion上添加一个虚拟模拟器,使其运行即可。 Then open your terminal and type: adb devices 然后打开您的终端并键入:adb devices

It will show, List of devices attached, make sure that new virtual device is running on some port. 它将显示“连接的设备列表”,确保新虚拟设备正在某个端口上运行。 ie : 192.168.56.101:5555 device 即:192.168.56.101:5555设备

Now use below use desired capabilities as below : 现在使用下面的方法使用所需的功能,如下所示:

DesiredCapabilities capabilities = new DesiredCapabilities(); DesiredCapabilities功能=新的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);

It will launch the apk in genemotion. 它将以genemotion启动apk。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用 appium 自动化 flutter 移动应用程序? - How to automate flutter mobile app using appium? 无法通过appium在android模拟器中启动计算器 - Failed to launch calculator in android emulator through appium Appium 无法在具有多个活动的 Android 模拟器上启动 - Appium fails to launch on Android emulator with multiple activities 应用程序在模拟器中启动时崩溃 - App crashes on launch in emulator 是否可以在同一测试中在一个模拟器上启动应用程序,并在另一个模拟器上启动移动浏览器? - Can I launch app on one emulator and mobile browser in another emulator in the same test? 在移动应用程序上使用appium滚动并查找页面中的元素 - Scroll and find element in a page using appium on mobile app 使用Appium查找Xpath for Mobile App(阻止我的自动化)的问题 - Issue in finding Xpath for Mobile App (Blocking my Automation) using Appium Appium 中的 Xpath 使用 Java - 移动应用程序 - 自动化测试 - Xpath in Appium Using Java - Mobile App - Automation testing 如何使用Appium在移动应用程序中获取烤面包机消息的文本 - How to get text of a toaster message in mobile app using Appium 如何使用 selenium 和 appium 自动化移动聊天应用程序? - How to automate mobile chat app using selenium with appium?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM