You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by al...@apache.org on 2017/05/30 08:55:26 UTC
cordova-paramedic git commit: Fixed inappbrowser runs on Android 7
Repository: cordova-paramedic
Updated Branches:
refs/heads/master 7e607a205 -> 9f99eee05
Fixed inappbrowser runs on Android 7
Project: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/commit/9f99eee0
Tree: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/tree/9f99eee0
Diff: http://git-wip-us.apache.org/repos/asf/cordova-paramedic/diff/9f99eee0
Branch: refs/heads/master
Commit: 9f99eee055e12099607e49eda34b5d1bae74735b
Parents: 7e607a2
Author: Alexander Sorokin <al...@akvelon.com>
Authored: Tue May 30 11:55:17 2017 +0300
Committer: Alexander Sorokin <al...@akvelon.com>
Committed: Tue May 30 11:55:17 2017 +0300
----------------------------------------------------------------------
lib/appium/helpers/wdHelper.js | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-paramedic/blob/9f99eee0/lib/appium/helpers/wdHelper.js
----------------------------------------------------------------------
diff --git a/lib/appium/helpers/wdHelper.js b/lib/appium/helpers/wdHelper.js
index 1d02f08..a029507 100644
--- a/lib/appium/helpers/wdHelper.js
+++ b/lib/appium/helpers/wdHelper.js
@@ -34,6 +34,8 @@ var path = require('path');
var wd = global.WD || require('wd');
var util = require('../../utils').utilities;
+var windowBlacklist = [];
+
module.exports.getDriver = function (platform) {
var normalizedPlatform;
var driverConfig = {};
@@ -205,9 +207,17 @@ module.exports.pollForEvents = function (driver, platform, skipBuster, windowOff
return driver
.windowHandles()
.then(function (windowHandles) {
+ if (windowBlacklist.indexOf(windowHandles[windowOffset]) >= 0) {
+ windowOffset += 1;
+ }
if (windowOffset >= windowHandles.length) {
throw new Error('Cannot find a window with the event cache.');
}
+ // Android 7 workaround:
+ // add current window to the blacklist
+ // because "execute" can just not work on one of the windows
+ // so we're not trying the same window twice
+ windowBlacklist.push(windowHandles[windowOffset]);
return driver.window(windowHandles[windowOffset]);
});
})
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org