Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
fix: Ensure that when the injection of axe-core into an iframe fails,…
Browse files Browse the repository at this point in the history
… the driver context is reset to something meaningful
  • Loading branch information
dylanb committed Jan 16, 2018
1 parent a9bc505 commit 10cf353
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function findFramesAndInject(parent, script, driver) {
});
}).catch(function (e) {
console.log('Failed to inject axe-core into one of the iframes!');
driver.switchTo().defaultContent();
});
});
});
Expand Down

0 comments on commit 10cf353

Please sign in to comment.