CB-12618: (android) Appium tests: Handle native cling

This commit is contained in:
Alexander Sorokin 2017-03-30 17:52:15 +03:00
parent d0b381aad8
commit 180f7b5510

View File

@ -610,6 +610,15 @@ describe('Camera tests Android.', function () {
.deviceKeyEvent(BACK_BUTTON)
.elementById('Apps')
.click()
.then(function () {
return driver
.elementByXPath('//android.widget.Button[@text="OK"]')
.click()
.fail(function () {
// no cling is all right
// it is not a brand new emulator, then
});
})
.elementByAndroidUIAutomator('new UiSelector().text("Gallery")')
.click()
.elementByAndroidUIAutomator('new UiSelector().textContains("Pictures")')