@@ -23,7 +23,7 @@ public abstract class BaseWebMobileElement{
23
23
public BaseWebMobileElement (WebDriver driver ) {
24
24
this .driver = driver ;
25
25
26
- wait = new FluentWait <WebDriver >(driver )
26
+ wait = new FluentWait <>(driver )
27
27
.withTimeout (timeOfWaiting , TimeUnit .SECONDS )
28
28
.pollingEvery (10 , TimeUnit .SECONDS )
29
29
.ignoring (NoSuchElementException .class )
@@ -34,7 +34,7 @@ public BaseWebMobileElement(WebDriver driver) {
34
34
public BaseWebMobileElement (WebDriver driver , int timeOfWaiting ) {
35
35
this .driver = driver ;
36
36
37
- wait = new FluentWait <WebDriver >(driver )
37
+ wait = new FluentWait <>(driver )
38
38
.withTimeout (timeOfWaiting , TimeUnit .SECONDS )
39
39
.pollingEvery (10 , TimeUnit .SECONDS )
40
40
.ignoring (NoSuchElementException .class )
@@ -51,16 +51,10 @@ public WebElement apply(WebDriver d) {
51
51
}
52
52
53
53
protected WebElement getWebElement (ExpectedCondition <WebElement > expectedCondition ) {
54
- WebDriverWait wait = new WebDriverWait (driver , timeOfWaiting );
55
54
return wait .until (expectedCondition );
56
55
}
57
56
58
57
protected MobileElement getMobileElement (final By by , int timeOfWaiting ) {
59
- wait = new FluentWait <WebDriver >(driver )
60
- .withTimeout (timeOfWaiting , TimeUnit .SECONDS )
61
- .pollingEvery (10 , TimeUnit .SECONDS )
62
- .ignoring (NoSuchElementException .class )
63
- .ignoring (TimeoutException .class );
64
58
return wait .until (new Function <WebDriver , MobileElement >() {
65
59
public MobileElement apply (WebDriver d ) {
66
60
return (MobileElement ) d .findElement (by );
0 commit comments