[AutoQC] Set up and convert to UIAutomator2

The UiAutomator2 Driver for Android

Requirements and Support

In addition to Appium’s general requirements:

  • Java 7 installed and configured correctly for your platform
  • Mac, Windows, or Linux OS with the ability to run the Android SDK

1. Server Appium

  • UiAutomator2 support get elements after open dialog with device over 8.
  • Add automationName: ‘UiAutomator2’
	browserName: '',
	platformName: 'Android',
	platformVersion: '8.1.0',
	deviceName: 'Tablet 800',
	udid: 'a6945810',
	noReset: true,
	autoGrantPermissions: true,
	appActivity: 'vn.rta.cpms.activities.SplashScreenActivity',
	appPackage: 'vn.rta.rtsurvey'

2. Some change

  • UiAutomator2 only use tap() in TouchAction (ex: tap({x: loc.x, y:loc.y})), NOT used continously click() (ex: el.click().click()….)
	element.tap() => element.click()
  • SendKeys will delete old text and paste into EditText.
	el.setImmediateValue() => el.sendKeys()