赞
踩
关于设置:
adb,aapt,uiautomaorviewr可配置,配置正确即可以找到文件启动用户配置,不正确使用程序自带配置。
(所有操作指令及结果都会输出到日志列表)
自动显示设备列表,模拟器或者真机。显示手机上安装的第三方程序和系统程序(可设置)
可以直接将手机端的app安装包复制到电脑,用于检测app。
aapt dump badging E:\Project\头脑王者\adbTools\bin\AdbToolsExe\AppPackge\cn.xuexi.android\base.apk
直接选择要操作的app安装程序就可以获取packge和主activity。
生成python、java和c#appium自动化测试链接代码
- # Python
- from appium import webdriver
- caps = {}
- caps["platformName"] = "Android"
- caps["platformVersion"] = "9.0.0"
- caps["deviceName"] = "Mi_Note_3"
- caps["appPackage"] = "com.antfortune.wealth"
- caps["appActivity"] = "com.alipay.mobile.quinox.LauncherActivity"
- caps["resetKeyboard"] = True
- caps["unicodeKeyboard"] = True
- driver = webdriver.Remote("http://localhost:4723/wd/hub", caps)
- driver.find_element_by_id("com.antfortune.wealth.login:id / login_main_button").click()
- driver.quit()
-
-
-
- //C# AND JAVE CODE,C# Need Change 'setCapability' to 'SetCapability'
- //C#
- DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
- desiredCapabilities.SetCapability("platformName", "Android");
- desiredCapabilities.SetCapability("appPackage", "cn.xuexi.android");
- desiredCapabilities.SetCapability("deviceName", "293d23a8");
- //SetCapability(MobileCapabilityType.DeviceName,"293d23a8");
- desiredCapabilities.SetCapability("platformVersion", "10");
- desiredCapabilities.SetCapability("appActivity", "com.alibaba.android.rimet.biz.SplashActivity");
- desiredCapabilities.SetCapability("resetKeyboard", true);
- desiredCapabilities.SetCapability("automationName", "UiAutomator2");
- desiredCapabilities.SetCapability("noReset", true);
- desiredCapabilities.SetCapability("ensureWebviewsHavePages", true);
- RemoteWebDriver remoteWebDriver = new RemoteWebDriver(new Uri("http://127.0.0.1:4723/wd/hub"), desiredCapabilities);
-
- //JAVA
- DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
- desiredCapabilities.setCapability("platformName", "Android");
- desiredCapabilities.setCapability("appPackage", "cn.xuexi.android");
- desiredCapabilities.setCapability("deviceName", "293d23a8");
- desiredCapabilities.setCapability("platformVersion", "10");
- desiredCapabilities.setCapability("appActivity", "com.alibaba.android.rimet.biz.SplashActivity");
- desiredCapabilities.setCapability("resetKeyboard", true);
- desiredCapabilities.setCapability("automationName", "UiAutomator2");
- desiredCapabilities.setCapability("noReset", true);
- desiredCapabilities.setCapability("ensureWebviewsHavePages", true);
- AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub", desiredCapabilities);
生成appium Capability设置
- {
- "deviceName": "293d23a8",
- "platformName": "Android",
- "platformVersion": "10",
- "appPackge": "cn.xuexi.android",
- "appActivity": "com.alibaba.android.rimet.biz.SplashActivity"
- }
自动保存页面,方便调试使用。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。