List of usage examples for org.openqa.selenium.support.ui ExpectedConditions titleContains
public static ExpectedCondition<Boolean> titleContains(final String title)
From source file:org.mycore.mir.it.tests.MIRComplexSearchITCase.java
@Test public final void searchBymirInstitute() { searchController.complexSearchBy(Collections.emptyList(), null, MIRInstitutes.Universitt_in_Deutschland, null, null, null, null, null, null); driver.waitFor(ExpectedConditions.titleContains("Suchergebnisse")); try {//w ww .j a v a 2 s. c o m String noDocumentsFoundText = "Keine Dokumente gefunden"; driver.findElement(MCRBy.partialText(noDocumentsFoundText)); Assert.fail(noDocumentsFoundText + " is present!"); } catch (NoSuchElementException e) { // this is good } }
From source file:org.mycore.mir.it.tests.MIRComplexSearchITCase.java
@Test public final void searchByClassification() { searchController.complexSearchBy(Collections.emptyList(), null, null, MIRDNBClassification._000.getValue(), null, null, null, null, null); driver.waitFor(ExpectedConditions.titleContains("Suchergebnisse")); try {/*w w w. j a va 2 s .c o m*/ String noDocumentsFoundText = "Keine Dokumente gefunden"; driver.findElement(MCRBy.partialText(noDocumentsFoundText)); Assert.fail(noDocumentsFoundText + " is present!"); } catch (NoSuchElementException e) { // this is good } }
From source file:org.mycore.mir.it.tests.MIRComplexSearchITCase.java
@Test public final void searchByLicense() { searchController.complexSearchBy(Collections.emptyList(), null, null, null, null, MIRLicense.cc_by_40.getValue(), null, null, null); driver.waitFor(ExpectedConditions.titleContains("Suchergebnisse")); try {/*from ww w . ja v a2s .c o m*/ String noDocumentsFoundText = "Keine Dokumente gefunden"; driver.findElement(MCRBy.partialText(noDocumentsFoundText)); Assert.fail(noDocumentsFoundText + " is present!"); } catch (NoSuchElementException e) { // this is good } }
From source file:org.mycore.mir.it.tests.MIRComplexSearchITCase.java
@Test public final void searchByStatus() { searchController.complexSearchBy(Collections.emptyList(), null, null, null, null, null, MIRStatus.gesperrt, null, null);/*from ww w. j av a 2 s. c o m*/ driver.waitFor(ExpectedConditions.titleContains("Suchergebnisse")); try { String noDocumentsFoundText = "Keine Dokumente gefunden"; driver.findElement(MCRBy.partialText(noDocumentsFoundText)); Assert.fail(noDocumentsFoundText + " is present!"); } catch (NoSuchElementException e) { // this is good } }
From source file:org.mycore.mir.it.tests.MIRComplexSearchITCase.java
@Test public final void searchByDate() { String timeStamp = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(LocalDateTime.now()); searchController.complexSearchBy(Collections.emptyList(), null, null, null, null, null, null, timeStamp, null);/* ww w.j av a 2s.c o m*/ driver.waitFor(ExpectedConditions.titleContains("Suchergebnisse")); try { String noDocumentsFoundText = "Keine Dokumente gefunden"; driver.findElement(MCRBy.partialText(noDocumentsFoundText)); Assert.fail(noDocumentsFoundText + " is present!"); } catch (NoSuchElementException e) { // this is good } }
From source file:org.mycore.mir.it.tests.MIRComplexSearchITCase.java
@Test @Ignore//w ww . jav a2 s. c o m public final void searchByFullText() { searchController.complexSearchBy(Collections.emptyList(), null, null, null, null, null, null, null, "condFullText"); driver.waitFor(ExpectedConditions.titleContains("Suchergebnisse")); try { String noDocumentsFoundText = "Keine Dokumente gefunden"; driver.findElement(MCRBy.partialText(noDocumentsFoundText)); Assert.fail(noDocumentsFoundText + " is present!"); } catch (NoSuchElementException e) { // this is good } }
From source file:org.mycore.mir.it.tests.MIRComplexSearchITCase.java
@Test public void searchByComplexQuery() { List<MIRComplexSearchQuery> complexSearchQueries = new ArrayList<>(); complexSearchQueries.add(new MIRComplexSearchQuery(MIRSearchFieldCondition.enthlt, MIRTestData.TITLE, MIRSearchField.Titel));//from ww w. j ava2s . c o m complexSearchQueries.add(new MIRComplexSearchQuery(MIRSearchFieldCondition.wie_, MIRTestData.AUTHOR_2, MIRSearchField.Autor)); complexSearchQueries.add(new MIRComplexSearchQuery(MIRSearchFieldCondition.Phrase, MIRTestData.SIGNATURE, MIRSearchField.Metadaten)); searchController.complexSearchBy(complexSearchQueries, null, null, null, null, null, null, null, null); driver.waitFor(ExpectedConditions.titleContains("Suchergebnisse")); try { String noDocumentsFoundText = "Keine Dokumente gefunden"; driver.findElement(MCRBy.partialText(noDocumentsFoundText)); Assert.fail(noDocumentsFoundText + " is present!"); } catch (NoSuchElementException e) { // this is good } }
From source file:org.wso2.iot.integration.ui.pages.devices.DevicesPage.java
License:Open Source License
public DevicesPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait.until(ExpectedConditions.titleContains("Device Management | IoT Server"))) { throw new IllegalStateException("This is not the Device Management page"); }/*from w w w . ja v a 2 s . c o m*/ }
From source file:org.wso2.iot.integration.ui.pages.devices.EnrollDevicePage.java
License:Open Source License
public EnrollDevicePage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait.until(ExpectedConditions.titleContains("Device Types | IoT Server"))) { throw new IllegalStateException("This is not the Device Enrollment page"); }// w w w . j a va2 s. c o m }
From source file:org.wso2.iot.integration.ui.pages.error.IOTErrorPage.java
License:Open Source License
public IOTErrorPage(WebDriver driver) throws IOException { this.driver = driver; this.uiElementMapper = UIElementMapper.getInstance(); WebDriverWait webDriverWait = new WebDriverWait(driver, UIUtils.webDriverTimeOut); if (!webDriverWait.until(ExpectedConditions.titleContains(uiElementMapper.getElement("cdmf.error.page")))) { isErrorPage = false;/*from w ww .j a v a 2 s. co m*/ throw new IllegalStateException("This is not the Error page"); } }