@@ -6,24 +6,24 @@ class SeleniumActions {
6
6
}
7
7
8
8
async loadUrl ( url ) {
9
- await this . driver . get ( url ) . catch ( error => { return ( error ) } ) ;
9
+ await this . driver . get ( url ) . catch ( error => { throw ( error ) } ) ;
10
10
}
11
11
12
12
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 ) } ) ;
14
14
}
15
15
16
16
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 ) } ) ;
18
18
}
19
19
20
20
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 ) } ) ;
22
22
}
23
23
24
24
async getInnerText ( ) {
25
25
return await this . driver . wait ( until . elementLocated ( By . css ( '.translation span' ) ) , 2000 ) . getText ( )
26
- . catch ( error => { return ( error ) } ) ;
26
+ . catch ( error => { throw ( error ) } ) ;
27
27
}
28
28
}
29
29
0 commit comments