Open ldino95 opened 6 years ago
package navigation;
import java.awt.AWTException; import java.io.IOException;
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver;
import commons.Print;
public class Pesquisar {
//Jmeter - Automaço Testes no funcionais (desempenho, stress,carga) public static void pesquisarTema(WebDriver driver) throws AWTException, IOException { //pesquisando livro driver.findElement(By.name("as_word")).sendKeys("livro"); //clicando na lupa driver.findElement(By.xpath("/html/body/header/div/form/button[3]/i")).click(); String receberValor; int contador = 1; while (contador <6) { receberValor = driver.findElement(By.xpath("//*[@id=\"searchResults\"]/li["+contador+"]")).getText(); System.out.println(receberValor); contador++; } Print.printElemento(driver, "//*[@id=\\\"searchResults\\\"]/li[\"+contador+\"]"); Print.PrintTela(); }
}
package navigation;
import java.awt.AWTException; import java.io.IOException;
import org.openqa.selenium.By; import org.openqa.selenium.WebDriver;
import commons.Print;
public class Pesquisar {
}