Added check for system supporting window id

pull/1514/head
b3nj4m1n 2020-05-22 21:05:30 +02:00
parent 3b3c95e57c
commit 4171848655
1 changed files with 2 additions and 1 deletions

View File

@ -188,6 +188,7 @@ const AutoType = {
logger.debug('Error during active window check, something is wrong', err);
return callback(false);
}
logger.info(this.supportsEventsWithWindowId);
if (activeWindowInfo.id !== windowInfo.id && !this.supportsEventsWithWindowId) {
logger.info(
`Active window doesn't match: ID is different. ` +
@ -195,7 +196,7 @@ const AutoType = {
);
return callback(false, activeWindowInfo);
}
if (activeWindowInfo.url !== windowInfo.url) {
if (activeWindowInfo.url !== windowInfo.url && !this.supportsEventsWithWindowId) {
logger.info(
`Active window doesn't match: url is different. ` +
`Expected "${windowInfo.url}", got "${activeWindowInfo.url}"`