mirror of
https://github.com/appium/appium.git
synced 2026-02-11 12:29:48 -06:00
Merge pull request #2717 from jlipps/master
ensure we don't get extraneous bits when finding activity
This commit is contained in:
@@ -1203,7 +1203,7 @@ ADB.prototype.getFocusedPackageAndActivity = function (cb) {
|
||||
logger.info("Getting focused package and activity");
|
||||
var cmd = "dumpsys window windows"
|
||||
, nullRe = new RegExp(/mFocusedApp=null/)
|
||||
, searchRe = new RegExp(/mFocusedApp.+ ([a-zA-Z0-9\._]+)\/(\.?[^\} ]+).*\}/);
|
||||
, searchRe = new RegExp(/mFocusedApp.+ ([a-zA-Z0-9\._]+)\/(\.?[^ ]+) /);
|
||||
|
||||
this.shell(cmd, function (err, stdout) {
|
||||
if (err) return cb(err);
|
||||
|
||||
Reference in New Issue
Block a user