@@ -23,7 +23,7 @@ public abstract class BaseWebMobileElement{
2323 public BaseWebMobileElement (WebDriver driver ) {
2424 this .driver = driver ;
2525
26- wait = new FluentWait <WebDriver >(driver )
26+ wait = new FluentWait <>(driver )
2727 .withTimeout (timeOfWaiting , TimeUnit .SECONDS )
2828 .pollingEvery (10 , TimeUnit .SECONDS )
2929 .ignoring (NoSuchElementException .class )
@@ -34,7 +34,7 @@ public BaseWebMobileElement(WebDriver driver) {
3434 public BaseWebMobileElement (WebDriver driver , int timeOfWaiting ) {
3535 this .driver = driver ;
3636
37- wait = new FluentWait <WebDriver >(driver )
37+ wait = new FluentWait <>(driver )
3838 .withTimeout (timeOfWaiting , TimeUnit .SECONDS )
3939 .pollingEvery (10 , TimeUnit .SECONDS )
4040 .ignoring (NoSuchElementException .class )
@@ -51,16 +51,10 @@ public WebElement apply(WebDriver d) {
5151 }
5252
5353 protected WebElement getWebElement (ExpectedCondition <WebElement > expectedCondition ) {
54- WebDriverWait wait = new WebDriverWait (driver , timeOfWaiting );
5554 return wait .until (expectedCondition );
5655 }
5756
5857 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 );
6458 return wait .until (new Function <WebDriver , MobileElement >() {
6559 public MobileElement apply (WebDriver d ) {
6660 return (MobileElement ) d .findElement (by );
0 commit comments