Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4ac0fd0

Browse files
Thow error instead of return
1 parent 10dd6d0 commit 4ac0fd0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎test/selenium/SeleniumActions.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@ class SeleniumActions {
66
}
77

88
async loadUrl(url) {
9-
await this.driver.get(url).catch(error => { return(error) });
9+
await this.driver.get(url).catch(error => { throw(error) });
1010
}
1111

1212
async enterTextAndPressEnterKey(text) {
13-
await this.driver.findElement(By.id('source')).sendKeys(text, Key.RETURN).catch(error => { return(error) });
13+
await this.driver.findElement(By.id('source')).sendKeys(text, Key.RETURN).catch(error => { throw(error) });
1414
}
1515

1616
async waitUntilElementIsLocated(timeout) {
17-
await this.driver.wait(until.elementLocated(By.id('source')), timeout).catch(error => { return(error) });
17+
await this.driver.wait(until.elementLocated(By.id('source')), timeout).catch(error => { throw(error) });
1818
}
1919

2020
async waitUntilPageTitleIsDisplayed(webPageTitle, timeout) {
21-
await this.driver.wait(until.titleIs(webPageTitle), timeout).catch(error => { return(error) });
21+
await this.driver.wait(until.titleIs(webPageTitle), timeout).catch(error => { throw(error) });
2222
}
2323

2424
async getInnerText() {
2525
return await this.driver.wait(until.elementLocated(By.css('.translation span')), 2000).getText()
26-
.catch(error => { return(error) });
26+
.catch(error => { throw(error) });
2727
}
2828
}
2929

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /