Versions actualitzades
This commit is contained in:
8
pom.xml
8
pom.xml
@@ -4,7 +4,7 @@
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.agile611.trainings.webdriver</groupId>
|
||||
<artifactId>cursoSeleniumWebdriver</artifactId>
|
||||
<version>26.04.23</version>
|
||||
<version>26.06</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -43,17 +43,17 @@
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>4.43.0</version>
|
||||
<version>4.44.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-firefox-driver</artifactId>
|
||||
<version>4.43.0</version>
|
||||
<version>4.44.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-chrome-driver</artifactId>
|
||||
<version>4.43.0</version>
|
||||
<version>4.44.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.agile611.testng.webdriver;
|
||||
|
||||
import java.io.File;
|
||||
import java.time.Duration;
|
||||
|
||||
import org.openqa.selenium.JavascriptExecutor;
|
||||
@@ -24,17 +23,19 @@ public class BaseTest {
|
||||
String browser = System.getProperty("browser");
|
||||
if (browser != null && browser.equalsIgnoreCase("firefox")) {
|
||||
FirefoxOptions options = new FirefoxOptions();
|
||||
System.setProperty("webdriver.gecko.driver",
|
||||
/* Activar si fa falta el driver en el PATH del sistema
|
||||
System.setProperty("webdriver.gecko.driver",
|
||||
"src" + File.separator + "test"
|
||||
+ File.separator + "resources"
|
||||
+ File.separator + "geckodriver-macos");
|
||||
+ File.separator + "geckodriver-macos");*/
|
||||
driver = new FirefoxDriver(options);
|
||||
} else if (browser != null && browser.equalsIgnoreCase("edge")) {
|
||||
EdgeOptions options = new EdgeOptions();
|
||||
System.setProperty("webdriver.edge.driver",
|
||||
/* Activar si fa falta el driver en el PATH del sistema
|
||||
System.setProperty("webdriver.edge.driver",
|
||||
"src" + File.separator + "test"
|
||||
+ File.separator + "resources"
|
||||
+ File.separator + "msedgedriver-macos");
|
||||
+ File.separator + "msedgedriver-macos");*/
|
||||
driver = new EdgeDriver(options);
|
||||
}
|
||||
else if(browser != null && browser.equalsIgnoreCase("safari")){
|
||||
@@ -42,10 +43,11 @@ public class BaseTest {
|
||||
}
|
||||
else {
|
||||
ChromeOptions options = new ChromeOptions();
|
||||
System.setProperty("webdriver.chrome.driver", "src"
|
||||
/* Activar si fa falta el driver en el PATH del sistema
|
||||
System.setProperty("webdriver.chrome.driver", "src"
|
||||
+ File.separator
|
||||
+ "test" + File.separator + "resources"
|
||||
+ File.separator + "chromedriver-macos");
|
||||
+ File.separator + "chromedriver-macos");*/
|
||||
driver = new ChromeDriver(options);
|
||||
}
|
||||
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user