@Override public void perform() { Graphene.waitGui().until().element(item).attribute("class").contains(OrderingListInPickList.SELECTED_ITEM_CLASS); } })
@Override public void selectAllRowsWithKeyShortcut() { advanced().getTableBodyElement().sendKeys(Keys.chord(Keys.CONTROL, "a")); if (advanced().getTableRowsElements().size() >= 1) { Graphene.waitAjax().until().element(advanced().getTableRowsElements().get(0)).attribute("class") .contains(advanced().getStyleClassForSelectedRow()); Graphene.waitAjax().until() .element(advanced().getTableRowsElements().get(advanced().getTableRowsElements().size() - 1)) .attribute("class").contains(advanced().getStyleClassForSelectedRow()); } }
@Override public void perform() { Graphene.waitGui().until().element(getRootElement()).attribute("class").contains(getStyleClassForSelectedItem()); } })
@Override public void perform() { Graphene.waitGui().until().element(getRootElement()).attribute("class").contains(getStyleClassForSelectedItem()); } })
@Override public void perform() { Graphene.waitGui().until().element(item).attribute("class").contains(advanced().getStyleForSelectedItem()); } }).perform();
private void switchTo(By by) { WebElement element = advanced().getRootElement().findElement(by); element.click(); Graphene.waitModel().until().element(element).attribute("class").contains(advanced().getActiveClass()); }
@Override public void selectRow(int rowIndex, Keys... keys) { clickOnRow(rowIndex, keys); Graphene.waitAjax().until().element(advanced().getTableRowsElements().get(rowIndex)).attribute("class") .contains(advanced().getStyleClassForSelectedRow()); }
private void selectMonth(int month) { WebElement monthElement = getRootElement().findElement(By.cssSelector("div[id*='DateEditorLayoutM" + (month - 1) + "']")); monthElement.click(); Graphene.waitGui().withMessage("Waiting for month to be selected.").until().element(monthElement).attribute("class").contains(getSelectedClass()); }
@Override public void deselectRow(int rowIndex, Keys... keys) { clickOnRow(rowIndex, keys); Graphene.waitAjax().until().element(advanced().getTableRowsElements().get(rowIndex)).attribute("class").not() .contains(advanced().getStyleClassForSelectedRow()); }
@Override public void perform() { Graphene.waitGui().until().element(getRootElement()).attribute("class").not().contains(getStyleClassForSelectedItem()); } })
@Override public void select(boolean deselectOthers) { // https://issues.jboss.org/browse/RF-14033 getRootElement().click(); Graphene.waitGui().withMessage("Waiting for day to be selected.").until().element(getRootElement()).attribute("class").contains(getStyleClassForSelectedItem()); } }
@Test public void testAttributeIsPresent() { loadPage(); checkAttributeIsPresent(Graphene.waitAjax().until().element(BY_HEADER).attribute("style")); }
@Test public void testEmptyAttribute() { Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_STYLE).attribute("style").is().not().present(); Graphene.waitModel().until().element(BY_INPUT_WITH_NO_STYLE_DEFINED).attribute("style").is().not().present(); Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_STYLE_WHITE_SPACES).attribute("style").is().not().present(); Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_READONLY).attribute("readonly").is().present(); }
@Test public void testEmptyAttribute() { Graphene.waitModel().until().element(inputWithEmptyStyle).attribute("style").is().not().present(); Graphene.waitModel().until().element(inputWithNoStyleDefined).attribute("style").is().not().present(); Graphene.waitModel().until().element(inputWithEmptyStyleWhiteSpaces).attribute("style").is().not().present(); Graphene.waitModel().until().element(inputWithEmptyReadonly).attribute("readonly").is().present(); }
@Test public void testEmptyAttribute() { Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_STYLE).attribute("style").is().not().present(); Graphene.waitModel().until().element(BY_INPUT_WITH_NO_STYLE_DEFINED).attribute("style").is().not().present(); Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_STYLE_WHITE_SPACES).attribute("style").is().not().present(); Graphene.waitModel().until().element(BY_INPUT_WITH_EMPTY_READONLY).attribute("readonly").is().present(); }