mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2025-05-05 21:22:54 +08:00
CB-11631 Appium tests: A working fix for a flaky "selection canceled" failure
This commit is contained in:
parent
62d1b01e81
commit
9f159d757a
@ -400,7 +400,18 @@ describe('Camera tests Android.', function () {
|
|||||||
return driver
|
return driver
|
||||||
.deviceKeyEvent(BACK_BUTTON)
|
.deviceKeyEvent(BACK_BUTTON)
|
||||||
// give native app some time to close
|
// give native app some time to close
|
||||||
.sleep(2000);
|
.sleep(2000)
|
||||||
|
// try again! because every ~30th build
|
||||||
|
// on Sauce Labs this backbutton doesn't work
|
||||||
|
.elementById('action_bar_title')
|
||||||
|
.then(function () {
|
||||||
|
// success means we're still in native app
|
||||||
|
return driver
|
||||||
|
.deviceKeyEvent(BACK_BUTTON);
|
||||||
|
}, function () {
|
||||||
|
// error means we're already in webview
|
||||||
|
return driver;
|
||||||
|
});
|
||||||
}, function () {
|
}, function () {
|
||||||
// error means we're already in webview
|
// error means we're already in webview
|
||||||
return driver;
|
return driver;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user