public void cleanDate() { if (!isVisible()) { throw new RuntimeException("Footer controls are not displayed, cannot interact with clean button"); } if (!getCleanButtonElement().isDisplayed()) { throw new RuntimeException("Clean button is not displayed."); } getCleanButtonElement().click(); Graphene.waitGui().withMessage("Waiting for clean button to be not visible.").until().element(getCleanButtonElement()).is().not().visible(); }
@Override protected void performWait(FluentWait<WebDriver, Void> wait) { wait.until().element(getRoot()).is().not().visible(); } }.withMessage("Waiting for footer controls to be not visible.");
@Override protected void performWait(FluentWait<WebDriver, Void> wait) { wait.until().element(getRootElement()).is().not().visible(); } }.withMessage("Waiting for time editor to be not visible.").withTimeout(getTimeoutForTimeEditorToBeNotVisible(), TimeUnit.MILLISECONDS);
@Override protected void performWait(FluentWait<WebDriver, Void> wait) { wait.until().element(getRoot()).is().not().visible(); } }.withMessage("Waiting for header controls to be not visible.")
@Override protected void performWait(FluentWait<WebDriver, Void> wait) { wait.until().element(getMenuPopup()).is().not().visible(); } }.withMessage("Waiting for menu to hide.")
protected void checkElementIsEnabled(ElementBuilder<?> select) { disableSelect.click(); select.is().not().enabled(); enableSelect.click(); select.is().enabled(); } }
protected void checkElementIsVisible(ElementBuilder<?> header) { hideButton.click(); header.is().not().visible(); appearButton.click(); header.is().visible(); }
protected void checkElementIsPresent(ElementBuilder<?> header) { idInput.clear(); idInput.sendKeys("header2"); updateButton.click(); header.is().not().present(); idInput.clear(); idInput.sendKeys("header"); updateButton.click(); header.is().present(); }
protected void checkElementIsPresent(ElementBuilder<?> header) { idInput.clear(); idInput.sendKeys("header2"); updateButton.click(); header.is().not().present(); idInput.clear(); idInput.sendKeys("header"); updateButton.click(); header.is().present(); }
@Override protected void performWait(FluentWait<WebDriver, Void> wait) { wait.until().element(getLocalList()).is().present(); wait.until().element(getGlobalList()).is().not().visible(); } }.withMessage("Waiting for popup to hide.")
@Test public void testElementIsPresent() { idInput.clear(); idInput.sendKeys("header2"); updateButton.click(); Graphene.waitModel(browser).until().element(header).is().not().present(); idInput.clear(); idInput.sendKeys("header"); updateButton.click(); Graphene.waitModel(browser).until().element(header).is().present(); }
@Test public void testElementIsVisible() { hideButton.click(); Graphene.waitModel().until().element(header).is().not().visible(); appearButton.click(); Graphene.waitModel().until().element(header).is().visible(); }
@Test public void testElementIsVisible() { hideButton.click(); Graphene.waitModel().until().element(header).is().not().visible(); appearButton.click(); Graphene.waitModel().until().element(header).is().visible(); }
@Test public void testElementIsVisibleWithBy() { hideButton.click(); Graphene.waitModel().until().element(BY_HEADER).is().not().visible(); appearButton.click(); Graphene.waitModel().until().element(BY_HEADER).is().visible(); }
@Test public void testElementIsVisibleWithBy() { hideButton.click(); Graphene.waitModel().until().element(BY_HEADER).is().not().visible(); appearButton.click(); Graphene.waitModel().until().element(BY_HEADER).is().visible(); }
@Test public void testElementIsVisibleDirectly() { loadPage(); hideButton.click(); Graphene.waitModel().until().element(BY_JQUERY_HEADER).is().not().visible(); appearButton.click(); Graphene.waitModel().until().element(BY_JQUERY_HEADER).is().visible(); }
@Test public void testElementIsClickable() { Graphene.waitModel().until().element(hideButton).is().clickable(); hideButton.click(); Graphene.waitModel().until().element(hideButton).is().not().clickable(); Graphene.waitModel().until().element(appearButton).is().clickable(); appearButton.click(); Graphene.waitModel().until().element(appearButton).is().not().clickable(); }
@Test public void testElementIsClickableWithBy() { Graphene.waitModel().until().element(BY_HIDE_BUTTON).is().clickable(); hideButton.click(); Graphene.waitModel().until().element(BY_HIDE_BUTTON).is().not().clickable(); Graphene.waitModel().until().element(BY_APPEAR_BUTTON).is().clickable(); appearButton.click(); Graphene.waitModel().until().element(BY_APPEAR_BUTTON).is().not().clickable(); }
@Test public void testElementIsSelected() { new Select(select).selectByIndex(0); Graphene.waitModel().until().element(option1).is().selected(); new Select(select).selectByIndex(1); Graphene.waitModel().until().element(option1).is().not().selected(); }
@Test public void testElementIsSelectedWithBy() { new Select(select).selectByIndex(0); Graphene.waitModel().until().element(BY_OPTION1).is().selected(); new Select(select).selectByIndex(1); Graphene.waitModel().until().element(BY_OPTION1).is().not().selected(); }