CB-11631 Appium tests: A fix for a flaky "selection cancelled" failure

This commit is contained in:
Alexander Sorokin
2016-08-13 16:58:33 +03:00
parent fee72c7c04
commit e588907ac7
2 changed files with 3 additions and 2 deletions
+3 -1
View File
@@ -398,7 +398,9 @@ describe('Camera tests Android.', function () {
.then(function () {
// success means we're still in native app
return driver
.deviceKeyEvent(BACK_BUTTON);
.deviceKeyEvent(BACK_BUTTON)
// give native app some time to close
.sleep(2000);
}, function () {
// error means we're already in webview
return driver;