简体   繁体   English

如何使用 selenium 和 appium 自动化移动聊天应用程序?

[英]How to automate mobile chat app using selenium with appium?

I have mobile app for chat user, it is similar to what's chat and having some additional features.我有一个供聊天用户使用的移动应用程序,它类似于聊天并具有一些附加功能。 How can we automate using selenium webdriver with android appium.我们如何在 android appium 中自动使用 selenium webdriver。

I am thinking for creating two instances but not getting clear idea about it.我正在考虑创建两个实例,但没有清楚地了解它。

Anyone is having any other solutions.任何人都有任何其他解决方案。

First of all you need to make Appium environment in your system.首先你需要在你的系统中创建 Appium 环境。

Once Appium is installed in your system follow the steps在系统中安装 Appium 后,请按照以下步骤操作

•   Open the APPIUM App
•   Click on ‘Android’ icon at top left
•   In Capabilities section, specify ‘Platform Name’ , ‘Automation Name’, ‘Platform version’ and Device Name’ as required.
•   Click on ‘Settings’ icon at top left
•   Verify the prefilled values i.e. Server address should be ‘127.0.0.1’ and Port as ‘4723’  

After above steps you need to specify the Package name and Activity name in the code完成以上步骤后需要在代码中指定Package名称和Activity名称

cap1.setCapability("appPackage", "com.android.settings");
        cap1.setCapability("appActivity", "com.android.settings.Settings");

Above mentioned package name and activity name belongs to SETTINGS in Android mobile上面提到的包名和活动名属于Android手机中的SETTINGS

PASSING PARAMETERS IN YOUR CODE在代码中传递参数

DesiredCapabilities cap1= new DesiredCapabilities();
    cap1.setCapability("deviceName", "Device name");
    cap1.setCapability("platformVersion", "Android version");
    cap1.setCapability("platformName", "Android");
    cap1.setCapability("browserName", "chrome");

    cap1.setCapability("appPackage", "com.android.settings");
    cap1.setCapability("appActivity", "com.android.settings.Settings");

These are the parameters you need to pass in your code to access your app.这些是您需要在代码中传递以访问您的应用程序的参数。

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

相关问题 如何使用 appium 自动化 flutter 移动应用程序? - How to automate flutter mobile app using appium? 如何使用Selenium / Webdriver自动执行聊天应用程序? - How to automate a chat application using Selenium/Webdriver? 如何使用appium在移动应用程序中有效地划分测试用例以使其自动化 - How to divide test cases effectively to automate them in a mobile app using appium 如何使用Appium同时自动化两个Android应用程序? - How to automate two android app simultaneously using Appium? 使用Appium在真实设备上自动化Mobile Safari并遇到未捕获的异常 - Using Appium to automate Mobile Safari on real device and encountering uncaught exceptions 如何使用Appium在移动应用程序中获取烤面包机消息的文本 - How to get text of a toaster message in mobile app using Appium appium:webview:selenium:如何在div上自动执行touchend事件? - appium : webview : selenium : How to automate touchend event on a div? 使用appium在模拟器上启动移动应用 - Launch an mobile app on emulator using appium 如何在Java中使用Appium和Selenium在移动浏览器中的Android设备中隐藏键盘 - How to hide keypad in android device in mobile browser using appium & selenium with java 如何与Appium一起使用移动Chrome和测试应用程序 - How to work with mobile chrome and testing app by Appium
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM