public UserCreateUpdateDialog<P> fillEditDialog(String fullName, String password, Role role) { Fluent browser = page.getBrowser(); browser.fill(FULL_NAME_FIELD).with(fullName); browser.fill(PASSWORD_FIELD).with(password); webElement.find(ROLE_OPTION, withText(role.name())).click(); return this; }
@Override protected FluentWebElement getCancelButton() { return webElement.findFirst(BUTTONS, withText(CANCEL)); }
@Override protected FluentWebElement getSubmitButton() { return webElement.findFirst(BUTTONS, withText(SAVE)); }
public boolean isRoleFieldDisabled() { return webElement.find(ROLE_FIELD).getAttribute("disabled").equals("true"); }
public boolean isUserNameFieldDisabled() { return webElement.find(USER_NAME_FIELD).getAttribute("disabled").equals("true"); }
public String getText() { return newField.getText(); }
/** * Clear the given parameters elements that are in the list Be careful - only the visible elements * are cleared * * @param fluentObject */ public Fluent clear(FluentWebElement fluentObject) { fluentObject.clear(); return this; }
@Test public void checkGetTextContentWorks() { goTo(DEFAULT_URL); FluentWebElement line = el("#hidden"); assertThat(line.textContent()).isNotEmpty(); }