Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
feat(protractor): allow file:// baseUrls
Browse files Browse the repository at this point in the history
Modified protractor to support testing node-webkit by using string concatenation vs url.resolve() when the baseUrl begins with file://

Closes #1266.
  • Loading branch information
mikemilano authored and juliemr committed Sep 3, 2014
1 parent be16606 commit 830f511
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 830f511

Please sign in to comment.