-
-
Notifications
You must be signed in to change notification settings - Fork 769
Description
Description
I am working on automation for an android app using appium . When i use uiautomator with appium then it works fine and my test case passes on android real device but when i switch to uiautomator2 , it throws error . Uiautomator is working fine for andorid version 6.0 but i need uiautomator2 for android device 8.1
Environment
- java client build version or git revision if you use some shapshot: 5.0.0-BETA9
- Appium server version or git revision if you use some shapshot: 1.7.2 beta
- Desktop OS/version used to run Appium if necessary: Widows 7
- Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: 8.9.4
- Mobile platform/version under test: Android 6.0
- Real device or emulator/simulator: Motorola real device
Details
I am running my android device (6.0) test cases on an android app using selenium and appium which is currently using the uiautomator but i require uiautomator2 as uiautomator gets crashed while running test cases on android version 8+ . I am getting error while using uiautomator2 .
[MJSONWP] Encountered internal error running command: TypeError: helpers.installApkRemotely is not a function
Code To Reproduce Issue [ Good To Have ]
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("automationName", "uiautomator2");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("app", "D:\\release.apk");
capabilities.setCapability("deviceName", "TA99300E8V");
capabilities.setCapability("platformVersion", "6.0");
capabilities.setCapability("appPackage","com.iongroup.ionweb.testagt");
capabilities.setCapability("appActivity","com.iongroup.ionweb.WebViewActivity");
driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
Ecxeption stacktraces
https://gist.github.com/shagupta92042/e46bad36c73b84c72936959a9d44043f
Link to Appium logs
https://gist.github.com/shagupta92042/e46bad36c73b84c72936959a9d44043f