Skip to content

Commit

Permalink
[js] Convert remaining portions of the core api from closure to node …
Browse files Browse the repository at this point in the history
…modules
  • Loading branch information
jleyba committed Feb 9, 2016
1 parent c9fa790 commit ecf530c
Show file tree
Hide file tree
Showing 16 changed files with 13,035 additions and 26 deletions.
20 changes: 17 additions & 3 deletions javascript/node/selenium-webdriver/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class InvalidSelectorError extends WebDriverError {

/**
* Occurs if the given session id is not in the list of active sessions, meaning
* the session either does not exist or that it’s not active.
* the session either does not exist or that it’s not active.
*/
class InvalidSessionIdError extends WebDriverError {
/** @param {string=} opt_error the error message, if any. */
Expand Down Expand Up @@ -382,15 +382,29 @@ class UnableToCaptureScreenError extends WebDriverError {
* A modal dialog was open, blocking this operation.
*/
class UnexpectedAlertOpenError extends WebDriverError {
/** @param {string=} opt_error the error message, if any. */
constructor(opt_error) {
/**
* @param {string=} opt_error the error message, if any.
* @param {string=} opt_text the text of the open dialog, if available.
*/
constructor(opt_error, opt_text) {
super(opt_error);

/** @private {(string|undefined)} */
this.text_ = opt_text;
}

/** @override */
static get code() {
return 'unexpected alert open';
}

/**
* @return {(string|undefined)} The text displayed with the unhandled alert,
* if available.
*/
getAlertText() {
return this.text_;
}
}


Expand Down
Loading

0 comments on commit ecf530c

Please sign in to comment.