@@ -0,0 +1,1436 @@
+package pt.fccn.mobile.arquivo.tests.pagesearch;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0Aimport org.openqa.selenium.By;%0A%0Aimport pt.fccn.arquivo.selenium.Retry;%0Aimport pt.fccn.arquivo.selenium.WebDriverTestBaseParalell;%0A%0A/**%0A *%0A * @author Ivo Branco %3Civo.branco@fccn.pt%3E%0A *%0A */%0Apublic class PageSearchTest extends WebDriverTestBaseParalell %7B%0A%0A%09public PageSearchTest(String os, String version, String browser, String deviceName, String deviceOrientation) %7B%0A%09%09super(os, version, browser, deviceName, deviceOrientation);%0A%09%7D%0A%0A%09@Test%0A%09@Retry%0A%09public void pageSearchTest() %7B%0A%09%09run(%22Search fccn.pt url%22, () -%3E %7B%0A%09%09%09driver.findElement(By.id(%22txtSearch%22)).clear();%0A%09%09%09driver.findElement(By.id(%22txtSearch%22)).sendKeys(%22fccn%22);%0A%09%09%09driver.findElement(By.xpath(%22//*%5B@id=%5C%22buttonSearch%5C%22%5D/button%22)).click();%0A%09%09%7D);%0A%0A%09%09waitUntilElementIsVisibleAndGet(By.id(%22resultados-lista%22));%0A%0A%09%09long emsCount = driver.findElementsByXPath(%22//*%5B@id=%5C%22resultados-lista%5C%22%5D//em%22) //%0A%09%09%09%09.stream() //%0A%09%09%09%09.filter(em -%3E em.getText().toLowerCase().contains(%22fccn%22)) //%0A%09%09%09%09.count();%0A%0A%09%09System.out.println(%22emsCount %22 + emsCount);%0A%0A%09%09int anchorsCount = driver.findElementsByXPath(%22//*%5B@id=%5C%22resultados-lista%5C%22%5D//a%5Bcontains(text(),'fccn')%5D%22)%0A%09%09%09%09.size();%0A%0A%09%09System.out.println(%22anchorsCount %22 + anchorsCount);%0A%0A%09%09assertTrue(%22At least 80 percent of results should show something related to search criteria%22,%0A%09%09%09%09emsCount + anchorsCount %3E= 10);%0A%09%7D%0A%0A%7D%0A

Add new page search test.