From 589d9b5f5595170462c4d5e6b4669c2847cc0d03 Mon Sep 17 00:00:00 2001 From: Mike Milano Date: Sat, 30 Aug 2014 00:41:08 -0700 Subject: [PATCH 1/2] Modified protractor to support testing node-webkit by using string concatenation vs url.resolve() when the baseUrl begins with file:// --- lib/protractor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/protractor.js b/lib/protractor.js index a7cf9ac0d..fc79a3b62 100644 --- a/lib/protractor.js +++ b/lib/protractor.js @@ -1042,7 +1042,8 @@ Protractor.prototype.get = function(destination, opt_timeout) { var timeout = opt_timeout ? opt_timeout : this.getPageTimeout; var self = this; - destination = url.resolve(this.baseUrl, destination); + destination = this.baseUrl.indexOf('file://') === 0 ? ? + this.baseUrl + destination : url.resolve(this.baseUrl, destination); if (this.ignoreSynchronization) { return this.driver.get(destination); From 8ea3bd12005663f48f4a879468cd73a957e08ebc Mon Sep 17 00:00:00 2001 From: Mike Milano Date: Sat, 30 Aug 2014 01:26:35 -0700 Subject: [PATCH 2/2] removed duplicate qmark --- lib/protractor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protractor.js b/lib/protractor.js index fc79a3b62..22efe28d3 100644 --- a/lib/protractor.js +++ b/lib/protractor.js @@ -1042,7 +1042,7 @@ Protractor.prototype.get = function(destination, opt_timeout) { var timeout = opt_timeout ? opt_timeout : this.getPageTimeout; var self = this; - destination = this.baseUrl.indexOf('file://') === 0 ? ? + destination = this.baseUrl.indexOf('file://') === 0 ? this.baseUrl + destination : url.resolve(this.baseUrl, destination); if (this.ignoreSynchronization) {