Github user filmaj commented on a diff in the pull request: https://github.com/apache/cordova-plugin-camera/pull/254#discussion_r102245774 --- Diff: appium-tests/ios/ios.spec.js --- @@ -82,11 +86,43 @@ describe('Camera tests iOS.', function () { .elementByXPath('//*[@label="Use"]') .click() .fail(function () { - // For some reason "Choose" element is not clickable by standard Appium methods + if (isXCUI) { + return driver + .waitForElementByAccessibilityId('Choose', MINUTE / 3) + .click(); + } + // For some reason "Choose" element is not clickable by standard Appium methods on iOS <= 9 return wdHelper.tapElementByXPath('//UIAButton[@label="Choose"]', driver); }); } + function clickPhoto() { + if (isXCUI) { + // iOS >=10 + return driver + .context(CONTEXT_NATIVE_APP) + .elementsByXPath('//XCUIElementTypeCell') + .then(function(photos) { + if (photos.length == 0) { + return driver + .sleep(0) // driver.source is not a function o.O + .source() + .then(function (src) { + console.log(src); + gracefullyFail('Couldn\'t find an image to click'); + }); + } + // intentionally clicking the second photo here + // the first one is not clickable for some reason + return photos[1].click(); --- End diff -- Ah, cool!
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org