0
public static void fluentWaitImplementation(WebDriver driver,WebElement elementToBeWaited,int timeOuts,int pollTime){
                   Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
                            .withTimeout(timeOuts,TimeUnit.SECONDS)
                            .pollingEvery(pollTime,TimeUnit.SECONDS)
                            .ignoring(Exception.class);

   WebElement waitingElement =wait.until(new Function<WebDriver, WebElement>() {
                        @Override
                        public WebElement apply( WebDriver driver) {
                            return elementToBeWaited;
                        }
                    });
                }



        WaitUtils.fluentWaitImplementation(webDriver,businessLevelSelectionComponent.getAllCheckBoxPath(count),60,10);

This code is generating exception and also it is not polling for element for visiblity.

sp324
  • 285
  • 2
  • 20
  • What is the exception? and you didn't tell the method to wait for viability. In fact, the method doesn't do anything. – Guy Nov 06 '18 at 07:24
  • element not found exception is there and also I have passed webElement and parameters from the line WaitUtils.fluentWaitImplementation(webDriver,businessLevelSelectionComponent.getAllCheckBoxPath(count),60,10); – sp324 Nov 06 '18 at 11:09
  • 1
    Check this discussion https://stackoverflow.com/questions/42275658/selenium-webdriver-3-0-1-selenium-showing-error-for-fluentwait-class-selenium – undetected Selenium Nov 06 '18 at 12:09
  • 1
    Thank you . @DebanjanB sir. – sp324 Nov 06 '18 at 12:38

1 Answers1

0

I got the another Solution for that. I implemented NgWebDriver's waitForAngularRequestToFinish()

sp324
  • 285
  • 2
  • 20