[英]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.