Skip to content
Snippets Groups Projects
Commit 778ea7a2 authored by tmortagne's avatar tmortagne
Browse files

Reuse standard TestUtils as much as possible

parent 10c4b96f
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,7 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.xwiki.test.ui.TestUtils;
/**
* Represents the actions possible on the Login page.
......@@ -53,7 +54,7 @@ public static LoginPage gotoPage()
public void loginAsAdmin()
{
loginAs("Admin", "admin", true);
loginAs(TestUtils.ADMIN_CREDENTIALS.getUserName(), TestUtils.ADMIN_CREDENTIALS.getPassword(), true);
}
public void loginAs(String username, String password, boolean rememberMe)
......@@ -63,7 +64,7 @@ public void loginAs(String username, String password, boolean rememberMe)
this.usernameText.sendKeys(username);
this.passwordText.sendKeys(password);
if (rememberMe) {
this.rememberMeCheckbox.click();;
this.rememberMeCheckbox.click();
}
this.submitButton.click();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment