Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
428 views
by
String paginationLastXpath = "//a[contains(@class,'ui-paginator-last') and not (contains(@class,'ui-state-disabled'))]";

        //if more pages make it page count 50 ,enabled '>' then records count more than 25

        if(driver.findElements(By.xpath(paginationLastXpath)).size()!= 0)

        {

            setPaginationCount(driver);

        }

        //if enabled '>' is found click it.

        while(driver.findElements(By.xpath(paginationLastXpath)).size()!= 0)

        {

            WebElement pageLastElement = DriverUtil.getFluentWaitElementByXPath(paginationLastXpath, 20, driver);

            pageLastElement.click();

            Thread.sleep(2000);

            boolean checkFilter = checkRecords(driver,formEntryMap);

            if(!checkFilter)

            {    

                return false;

            }

        }

this method where after searching the records it will navigate to the bottom of the page and check if the last page icon is enabled and if it is it will click else it will come out of the loop

the probelm is when the last page icon is disabled then it causes a org.openqa.selenium.ElementNotInteractableException:will some one be able o help on this can share the method

Please log in or register to answer this question.

...