Skip to content

Commit

Permalink
Bump to CDP v125
Browse files Browse the repository at this point in the history
  • Loading branch information
bonigarcia committed May 20, 2024
1 parent cbbdf31 commit 4e6d436
Show file tree
Hide file tree
Showing 40 changed files with 88 additions and 84 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.BlockedReason;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.BlockedReason;
import org.slf4j.Logger;

import com.google.common.collect.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v125.network.Network;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.ConnectionType;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.ConnectionType;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down Expand Up @@ -61,7 +61,8 @@ public void testEmulateNetworkConditions() {
devTools.send(Network.enable(Optional.empty(), Optional.empty(),
Optional.empty()));
devTools.send(Network.emulateNetworkConditions(false, 100, 50 * 1024,
50 * 1024, Optional.of(ConnectionType.CELLULAR3G)));
50 * 1024, Optional.of(ConnectionType.CELLULAR3G),
Optional.empty(), Optional.empty(), Optional.empty()));

long initMillis = System.currentTimeMillis();
driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Headers;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Headers;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.dom.model.Rect;
import org.openqa.selenium.devtools.v122.page.Page;
import org.openqa.selenium.devtools.v122.page.Page.GetLayoutMetricsResponse;
import org.openqa.selenium.devtools.v122.page.model.Viewport;
import org.openqa.selenium.devtools.v125.dom.model.Rect;
import org.openqa.selenium.devtools.v125.page.Page;
import org.openqa.selenium.devtools.v125.page.Page.GetLayoutMetricsResponse;
import org.openqa.selenium.devtools.v125.page.model.Viewport;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.emulation.Emulation;
import org.openqa.selenium.devtools.v125.emulation.Emulation;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.security.Security;
import org.openqa.selenium.devtools.v125.security.Security;
import org.openqa.selenium.support.Color;
import org.slf4j.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Cookie;
import org.openqa.selenium.devtools.v122.storage.Storage;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Cookie;
import org.openqa.selenium.devtools.v125.storage.Storage;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Headers;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Headers;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.performance.Performance;
import org.openqa.selenium.devtools.v122.performance.model.Metric;
import org.openqa.selenium.devtools.v125.performance.Performance;
import org.openqa.selenium.devtools.v125.performance.model.Metric;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.BlockedReason;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.BlockedReason;
import org.slf4j.Logger;

import com.google.common.collect.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v125.network.Network;

import io.github.bonigarcia.seljup.SeleniumJupiter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.ConnectionType;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.ConnectionType;
import org.slf4j.Logger;

import io.github.bonigarcia.seljup.SeleniumJupiter;
Expand All @@ -43,7 +43,8 @@ void testEmulateNetworkConditions(ChromeDriver driver, DevTools devTools) {
devTools.send(Network.enable(Optional.empty(), Optional.empty(),
Optional.empty()));
devTools.send(Network.emulateNetworkConditions(false, 100, 50 * 1024,
50 * 1024, Optional.of(ConnectionType.CELLULAR3G)));
50 * 1024, Optional.of(ConnectionType.CELLULAR3G),
Optional.empty(), Optional.empty(), Optional.empty()));

long initMillis = System.currentTimeMillis();
driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Headers;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Headers;

import io.github.bonigarcia.seljup.SeleniumJupiter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.dom.model.Rect;
import org.openqa.selenium.devtools.v122.page.Page;
import org.openqa.selenium.devtools.v122.page.Page.GetLayoutMetricsResponse;
import org.openqa.selenium.devtools.v122.page.model.Viewport;
import org.openqa.selenium.devtools.v125.dom.model.Rect;
import org.openqa.selenium.devtools.v125.page.Page;
import org.openqa.selenium.devtools.v125.page.Page.GetLayoutMetricsResponse;
import org.openqa.selenium.devtools.v125.page.model.Viewport;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.emulation.Emulation;
import org.openqa.selenium.devtools.v125.emulation.Emulation;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.security.Security;
import org.openqa.selenium.devtools.v125.security.Security;
import org.openqa.selenium.support.Color;

import io.github.bonigarcia.seljup.SeleniumJupiter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Cookie;
import org.openqa.selenium.devtools.v122.storage.Storage;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Cookie;
import org.openqa.selenium.devtools.v125.storage.Storage;
import org.slf4j.Logger;

import io.github.bonigarcia.seljup.SeleniumJupiter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Headers;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Headers;
import org.slf4j.Logger;

import io.github.bonigarcia.seljup.SeleniumJupiter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.performance.Performance;
import org.openqa.selenium.devtools.v122.performance.model.Metric;
import org.openqa.selenium.devtools.v125.performance.Performance;
import org.openqa.selenium.devtools.v125.performance.model.Metric;
import org.slf4j.Logger;

import io.github.bonigarcia.seljup.SeleniumJupiter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.BlockedReason;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.BlockedReason;
import org.slf4j.Logger;

import com.google.common.collect.ImmutableList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v125.network.Network;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.ConnectionType;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.ConnectionType;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down Expand Up @@ -61,7 +61,8 @@ void testEmulateNetworkConditions() {
devTools.send(Network.enable(Optional.empty(), Optional.empty(),
Optional.empty()));
devTools.send(Network.emulateNetworkConditions(false, 100, 50 * 1024,
50 * 1024, Optional.of(ConnectionType.CELLULAR3G)));
50 * 1024, Optional.of(ConnectionType.CELLULAR3G),
Optional.empty(), Optional.empty(), Optional.empty()));

long initMillis = System.currentTimeMillis();
driver.get("https://bonigarcia.dev/selenium-webdriver-java/");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Headers;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Headers;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.dom.model.Rect;
import org.openqa.selenium.devtools.v122.page.Page;
import org.openqa.selenium.devtools.v122.page.Page.GetLayoutMetricsResponse;
import org.openqa.selenium.devtools.v122.page.model.Viewport;
import org.openqa.selenium.devtools.v125.dom.model.Rect;
import org.openqa.selenium.devtools.v125.page.Page;
import org.openqa.selenium.devtools.v125.page.Page.GetLayoutMetricsResponse;
import org.openqa.selenium.devtools.v125.page.model.Viewport;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.emulation.Emulation;
import org.openqa.selenium.devtools.v125.emulation.Emulation;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.security.Security;
import org.openqa.selenium.devtools.v125.security.Security;
import org.openqa.selenium.support.Color;
import org.slf4j.Logger;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Cookie;
import org.openqa.selenium.devtools.v122.storage.Storage;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Cookie;
import org.openqa.selenium.devtools.v125.storage.Storage;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.Headers;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.Headers;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.performance.Performance;
import org.openqa.selenium.devtools.v122.performance.model.Metric;
import org.openqa.selenium.devtools.v125.performance.Performance;
import org.openqa.selenium.devtools.v125.performance.model.Metric;
import org.slf4j.Logger;

import io.github.bonigarcia.wdm.WebDriverManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v122.network.model.BlockedReason;
import org.openqa.selenium.devtools.v125.network.Network;
import org.openqa.selenium.devtools.v125.network.model.BlockedReason;
import org.slf4j.Logger;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.v122.network.Network;
import org.openqa.selenium.devtools.v125.network.Network;
import org.slf4j.Logger;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
Expand Down
Loading

0 comments on commit 4e6d436

Please sign in to comment.