How to wait dynamically until the progress bar is fully loaded in Selenium Webdriver?

During automation of one AJAX application, I ran into a problem below.

Scenario: I clicked on an item and the progress bar continues to load. I want to wait for the progress bar to stop. How to promote AJAX elements of this type in Selenium Webdriver using java as a language.

NOTE. When the progress bar is loading, in the background the element is PRESENT..otherwise, I would use the wait of the element until the element appears.

Can anyone help me for the same?

Thank,

Sudhansu

0
source share
1 answer

Try with the logic below.

int i=0;
while(isElementPresent(By.id("ajax_progressbar")))
{
    Thread.sleep(100);
    if(++i>200)
    {
       break;
    }
}
  • ,
0

Source: https://habr.com/ru/post/1649624/


All Articles