ultims
This commit is contained in:
@@ -45,7 +45,7 @@ public class BaseTest {
|
|||||||
else {
|
else {
|
||||||
driver = new ChromeDriver();
|
driver = new ChromeDriver();
|
||||||
}
|
}
|
||||||
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
|
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10));
|
||||||
driver.manage().window().maximize();
|
driver.manage().window().maximize();
|
||||||
jse = (JavascriptExecutor) driver;
|
jse = (JavascriptExecutor) driver;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
package com.agile611.testng.webdriver;
|
package com.agile611.testng.webdriver;
|
||||||
|
|
||||||
import net.lightbody.bmp.BrowserMobProxy;
|
import java.util.List;
|
||||||
import net.lightbody.bmp.BrowserMobProxyServer;
|
|
||||||
import net.lightbody.bmp.client.ClientUtil;
|
|
||||||
import net.lightbody.bmp.core.har.Har;
|
|
||||||
import net.lightbody.bmp.core.har.HarEntry;
|
|
||||||
import org.openqa.selenium.Proxy;
|
import org.openqa.selenium.Proxy;
|
||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||||
@@ -14,8 +11,11 @@ import org.testng.annotations.AfterMethod;
|
|||||||
import org.testng.annotations.BeforeMethod;
|
import org.testng.annotations.BeforeMethod;
|
||||||
import org.testng.annotations.Test;
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
import java.io.File;
|
import net.lightbody.bmp.BrowserMobProxy;
|
||||||
import java.util.List;
|
import net.lightbody.bmp.BrowserMobProxyServer;
|
||||||
|
import net.lightbody.bmp.client.ClientUtil;
|
||||||
|
import net.lightbody.bmp.core.har.Har;
|
||||||
|
import net.lightbody.bmp.core.har.HarEntry;
|
||||||
|
|
||||||
public class BrokenImages {
|
public class BrokenImages {
|
||||||
WebDriver driver;
|
WebDriver driver;
|
||||||
@@ -32,14 +32,7 @@ public class BrokenImages {
|
|||||||
|
|
||||||
// 3. Inyectar el proxy en las opciones de Firefox
|
// 3. Inyectar el proxy en las opciones de Firefox
|
||||||
FirefoxOptions options = new FirefoxOptions();
|
FirefoxOptions options = new FirefoxOptions();
|
||||||
options.setProxy(seleniumProxy);
|
options.setProxy(seleniumProxy);
|
||||||
|
|
||||||
// Nota: Si usas Selenium 4.6+, esta línea ya no es necesaria gracias a Selenium Manager
|
|
||||||
System.setProperty("webdriver.gecko.driver",
|
|
||||||
"src" + File.separator + "test"
|
|
||||||
+ File.separator + "resources"
|
|
||||||
+ File.separator + "geckodriver-macos");
|
|
||||||
|
|
||||||
driver = new FirefoxDriver(options);
|
driver = new FirefoxDriver(options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user