From 6a63bf682c43c0f4658390ab8f942958fdeb6241 Mon Sep 17 00:00:00 2001 From: Georgii Dolzhykov Date: Wed, 15 Mar 2017 03:36:52 +0300 Subject: [PATCH] fix(navigation): ignore unknown JS errors in IE The `err` object doesn't have the `code` property any more (Selenium Server Standalone 3.3.1 + IEDriver win32 3.3.0), so we need a new way to detect those errors. See #841 --- lib/browser.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/browser.ts b/lib/browser.ts index b37c46a68..5d02bbbed 100644 --- a/lib/browser.ts +++ b/lib/browser.ts @@ -900,7 +900,7 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver { return url !== this.resetUrl; }, (err: IError) => { - if (err.code == 13) { + if (err.code == 13 || err.name === 'JavascriptError') { // Ignore the error, and continue trying. This is // because IE driver sometimes (~1%) will throw an // unknown error from this execution. See