Updated a 4.43.0 selenium-java

This commit is contained in:
Guillem Hernandez Sola
2026-04-20 12:26:24 +02:00
parent 3cd765934d
commit a1f79f41c6
6 changed files with 15 additions and 21 deletions

View File

@@ -1,15 +1,14 @@
package com.agile611.testng.webdriver;
import java.net.URL;
import java.time.Duration;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import java.io.File;
import java.net.URL;
import java.util.concurrent.TimeUnit;
public class BaseRemoteWebDriverTest {
public RemoteWebDriver driver;
@BeforeClass(alwaysRun = true) //Inicialización del navegador
@@ -22,8 +21,7 @@ public class BaseRemoteWebDriverTest {
FirefoxOptions options = new FirefoxOptions();
driver = new RemoteWebDriver(new URL("http://0.0.0.0:4444/wd/hub"), options);
}
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
}
@AfterClass(alwaysRun = true) //El cierre del navegador

View File

@@ -1,17 +1,17 @@
package com.agile611.testng.webdriver;
import java.net.URL;
import java.time.Duration;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.edge.EdgeOptions;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.ie.InternetExplorerOptions;
import org.openqa.selenium.safari.SafariOptions;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.safari.SafariOptions;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import java.net.URL;
import java.util.concurrent.TimeUnit;
public class BaseSaucelabsTest {
public RemoteWebDriver driver;
@BeforeClass(alwaysRun = true) //Inicialización del navegador
@@ -39,8 +39,7 @@ public class BaseSaucelabsTest {
FirefoxOptions options = new FirefoxOptions();
driver = new RemoteWebDriver(new URL("http://selgp:ee557a77-606f-451d-9c8b-a4bb3ef03c90@ondemand.saucelabs.com:80/wd/hub"), options);
}
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
}
@AfterClass(alwaysRun = true) //El cierre del navegador

View File

@@ -8,6 +8,5 @@ public class BasicAuth extends BaseTest {
public void testApp() throws InterruptedException {
driver.navigate().to("https://admin:admin@the-internet.herokuapp.com/basic_auth");
Thread.sleep(5000);
}
}

View File

@@ -1,5 +1,8 @@
package com.agile611.testng.webdriver;
import java.io.File;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
@@ -9,10 +12,6 @@ import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
public class BrokenImages {
WebDriver driver;

View File

@@ -1,11 +1,11 @@
package com.agile611.testng.webdriver;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Test;
import java.util.List;
public class ChallengingDomTest extends BaseTest {
@Test

View File

@@ -2,10 +2,9 @@ package com.agile611.testng.webdriver;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.annotations.Test;
import static org.testng.Assert.assertNull;
import static org.testng.Assert.assertTrue;
import org.testng.annotations.Test;
public class CheckBoxesTest extends BaseTest {