protected void checkElementTextContains(ElementBuilder<?> header) { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); header.text().contains("machine"); textInput.clear(); textInput.sendKeys("Tested Header"); updateButton.click(); header.text().not().contains("machine"); }
protected void checkElementTextContains(ElementBuilder<?> header) { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); header.text().contains("machine"); textInput.clear(); textInput.sendKeys("Tested Header"); updateButton.click(); header.text().not().contains("machine"); }
public void previousDecade() { String firstBefore = getFirstYear().getText(); getPreviousDecadeButtonElement().click(); Graphene.waitGui().withMessage("Waiting for decade to change.").until().element(getFirstYear()).text().not().equalTo(firstBefore); }
public void nextDecade() { String firstBefore = getFirstYear().getText(); getNextDecadeButtonElement().click(); Graphene.waitGui().withMessage("Waiting for decade to change.").until().element(getFirstYear()).text().not().equalTo(firstBefore); }
public void nextYear() { if (!isVisible() || !getNextYearElement().isDisplayed()) { throw new RuntimeException("Cannot interact with nextYear button. " + "Ensure that calendar popup and header controls are displayed."); } String before = getYearAndMonthEditorOpenerElement().getText(); getNextYearElement().click(); Graphene.waitAjax().withMessage("Waiting for year to change.").until().element(getYearAndMonthEditorOpenerElement()).text().not().equalTo(before); }
public void previousMonth() { if (!isVisible() || !getPreviousMonthElement().isDisplayed()) { throw new RuntimeException("Cannot interact with previousMonth button. " + "Ensure that calendar popup and header controls are displayed."); } String before = getYearAndMonthEditorOpenerElement().getText(); getPreviousMonthElement().click(); Graphene.waitAjax().withMessage("Waiting for month to change.").until().element(getYearAndMonthEditorOpenerElement()).text().not().equalTo(before); }
public void nextMonth() { if (!isVisible() || !getNextMonthElement().isDisplayed()) { throw new RuntimeException("Cannot interact with nextMonth button. " + "Ensure that calendar popup and header controls are displayed."); } String before = getYearAndMonthEditorOpenerElement().getText(); getNextMonthElement().click(); Graphene.waitAjax().withMessage("Waiting for month to change.").until().element(getYearAndMonthEditorOpenerElement()).text().not().equalTo(before); }
public void previousYear() { if (!isVisible() || !getPreviousYearElement().isDisplayed()) { throw new RuntimeException("Cannot interact with previousYear button. " + "Ensure that calendar popup and header controls are displayed."); } String before = getYearAndMonthEditorOpenerElement().getText(); getPreviousYearElement().click(); Graphene.waitAjax().withMessage("Waiting for year to change.").until().element(getYearAndMonthEditorOpenerElement()).text().not().equalTo(before); }
@Override public void switchTo(DataScrollerSwitchButton btn) { String prevPageText = advanced().getActivePageElement().getText(); advanced().getButtonElement(btn).click(); Graphene.waitModel().until().element(advanced().getActivePageElement()).text().not().equalTo(prevPageText); }
@Test public void testElementTextEqualsIgnoreCase() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(header).text().equalToIgnoreCase("FLORENCE aNd THE machIne"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(header).text().not().equalToIgnoreCase("FLORENCE aNd THE machIne"); }
@Test public void testElementTextContainsWithBy() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().contains("machine"); textInput.clear(); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().not().contains("machine"); }
@Test public void testElementTextEqualsWithBy() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().equalTo("florence and the machine"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().not().equalTo("florence and the machine"); }
@Test public void testElementTextEqualsIgnoreCaseWithBy() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().equalToIgnoreCase("FLORENCE aNd THE machIne"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().not().equalToIgnoreCase("FLORENCE aNd THE machIne"); }
@Test public void testElementTextMatchesWithBy() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().matches("[fF]lorenc. and (the)? [mM]a.hine"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().not().matches("[fF]lorenc. and (the)? [mM]a.hine"); } }
@Test public void testElementTextEqualsIgnoreCaseWithBy() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().equalToIgnoreCase("FLORENCE aNd THE machIne"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().not().equalToIgnoreCase("FLORENCE aNd THE machIne"); }
@Test public void testElementTextMatches() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(header).text().matches("[fF]lorenc. and (the)? [mM]a.hine"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(header).text().not().matches("[fF]lorenc. and (the)? [mM]a.hine"); }
@Test public void testElementTextEqualsWithBy() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().equalTo("florence and the machine"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().not().equalTo("florence and the machine"); }
@Test public void testElementTextMatchesWithBy() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().matches("[fF]lorenc. and (the)? [mM]a.hine"); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(BY_HEADER).text().not().matches("[fF]lorenc. and (the)? [mM]a.hine"); } }
@Test public void testElementTextContains() { textInput.clear(); textInput.sendKeys("florence and the machine"); updateButton.click(); Graphene.waitModel().until().element(header).text().contains("machine"); textInput.clear(); textInput.sendKeys("Tested Header"); updateButton.click(); Graphene.waitModel().until().element(header).text().not().contains("machine"); }
@Test public void testXhr() throws InterruptedException { RequestGuard guard = JSInterfaceFactory.create(GrapheneContext.getContextFor(Default.class), RequestGuard.class); assertEquals(RequestType.HTTP, guard.getRequestType()); guard.clearRequestDone(); assertEquals(RequestType.NONE, guard.getRequestType()); xhr.click(); waitAjax().until().element(status).text().contains("DONE"); assertEquals(RequestType.XHR, guard.getRequestType()); }