Created
January 5, 2012 17:56
-
-
Save tarun3kumar/1566370 to your computer and use it in GitHub Desktop.
Using selenium waitForCondition method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginTest { | |
@Test | |
public void testLogin() { | |
login(userName, userPassword); | |
waitForCondition("selenium.isElementPresent(\""+UserDashboard.getDashboardLocator()+"\")", "60000"); | |
// Some assertion here | |
} | |
} | |
class UserDashboard { | |
public static String getDashboardLocator() { | |
return "//a[text()='Dashboard']"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment