Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample automation script to log in then log out of Using the framework.
@Config(url="", browser=Browser.FIREFOX)
public class TestFlipKart extends AutomationTest {
public void testLoginLogout() {
String username = "<username>";
String password = "<password>";
.setText(By.cssSelector("input[name='email']"), username)
.setText(By.cssSelector("input[name='password']"), password)
.validatePresent(By.cssSelector("li.greeting-link > a"))
.hoverOver(By.cssSelector("li.greeting-link > a"))
.click(By.cssSelector("ul.account-dropdown a[href*='/logout']"))
// should be logged out now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment