Can anyone suggest how to work WaitPagetoload after clicking the button from one page to another page.

Can anyone suggest how to work WaitPagetoload after clicking the button from one page to another page in a selenium framework.

Maran Default Asked on July 15, 2015 in Selenium WebDriver.
Add Comment
1 Answer(s)

Hi Maran,

public void waitForPageToLoad(String title){
     Integer i = 1;
     for(i=1;i<=100;i++) {
          if (driver.getTitle().equals(title)) {
               break;
          }
          Thread.sleep(6000);
     }
}

Try with this code. If u have further question just ask

Janani

Janani Train Answered on July 16, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.