Skip to content

Commit 45796c8

Browse files
samuongjleyba
authored andcommitted
Modify webdriver.js to create a new session if no session id is given.
Signed-off-by: Jason Leyba <jmleyba@gmail.com>
1 parent bc4eee4 commit 45796c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

javascript/webdriver/builder.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,7 @@ webdriver.Builder.prototype.build = function() {
201201
if (this.sessionId_) {
202202
return webdriver.WebDriver.attachToSession(executor, this.sessionId_);
203203
} else {
204-
throw new Error('Unable to create a new client for this browser. The ' +
205-
'WebDriver session ID has not been defined.');
204+
return webdriver.WebDriver.createSession(executor, this.capabilities_);
206205
}
207206
}
208207
};

0 commit comments

Comments
 (0)