Fix DefaultRolesTest

(cherry picked from commit 6e7470d)
This commit is contained in:
Vaclav Muzikar 2016-02-16 13:46:11 +01:00
parent c34aa5763d
commit b41dd22ed3
2 changed files with 11 additions and 1 deletions

View file

@ -5,6 +5,8 @@ import static org.keycloak.testsuite.console.page.fragment.Breadcrumb.BREADCRUMB
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import static org.keycloak.testsuite.util.WaitUtils.*;
/**
*
* @author tkyjovsk
@ -54,22 +56,27 @@ public class User extends Users {
private WebElement sessionsLink;
public void attributes() {
waitUntilElement(attributesLink).is().present();
attributesLink.click();
}
public void credentials() {
waitUntilElement(consentsLink).is().present();
credentialsLink.click();
}
public void roleMappings() {
waitUntilElement(roleMappingsLink).is().present();
roleMappingsLink.click();
}
public void consents() {
waitUntilElement(consentsLink).is().present();
consentsLink.click();
}
public void sessions() {
waitUntilElement(sessionsLink).is().present();
sessionsLink.click();
}

View file

@ -74,7 +74,10 @@ public class Users extends AdminConsoleRealm {
public void clickUser(String username) {
waitUntilElement(body()).is().present();
body().findElement(linkText(username)).click();
WebElement link = body().findElement(
By.xpath(".//tr/td[./following::td[text()='" + username + "']]/a")
);
link.click();
}
public void editUser(String username) {