Friday, 17 June 2016

Wait until page title changes in Selenium

Below method will wait until page title changes to the one passed as parameter in Selenium.

public boolean waitUntilTitleChanges(String title){
        for (int i=0;i<60;i++){
            if (driver.getTitle().equalsIgnoreCase(title))
                return true
            else
                sleep(1000)
        }
        return false
    }


What do you think on above selenium topic. Please provide your inputs and comments. You can write to me at reply2sagar@gmail.com

No comments:

Post a Comment

Buy Best Selenium Books

About Me

My photo

Self-motivated software professional