CB-11232 Appium tests: fixed element tapping on iOS 9

This commit is contained in:
Alexander Sorokin 2016-05-11 17:51:43 +03:00
parent 278b527702
commit dcc81bfbe1

View File

@ -81,17 +81,8 @@ describe('Camera tests iOS.', function () {
.elementByXPath('//*[@label="Use"]')
.click()
.fail(function () {
return driver
// For some reason "Choose" element is not clickable by standard Appium methods
// So getting its position and tapping there using TouchAction
.elementByXPath('//UIAButton[@label="Choose"]')
.getLocation()
.then(function (loc) {
var tapChoose = new wd.TouchAction();
tapChoose.tap(loc);
return driver
.performTouchAction(tapChoose);
});
return wdHelper.tapElementByXPath('//UIAButton[@label="Choose"]', driver);
});
}