-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeb.java
More file actions
25 lines (21 loc) · 703 Bytes
/
Copy pathWeb.java
File metadata and controls
25 lines (21 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package support;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Web {
public static WebDriver createChrome(String ambiente) {
// Cria Webdriver para a automatização
WebDriver navegador = new ChromeDriver();
//Espera implicita de 30 segundos
navegador.manage (). timeouts (). implicitlyWait (30, TimeUnit.SECONDS);
// Maximiza a tela
navegador.manage().window().maximize();
// Navega para o endereço do ESERVICE de acordo com o ambiente
if(ambiente == "QA") {
navegador.get("https://eservice_QA.com/");
}else{
navegador.get("https://eservice_PP.com/");
}
return navegador;
}
}