Skip to content

Update dependency selenium to v4.33.0 #2293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/dotnet/SeleniumDocs/BaseTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class BaseTest
protected IWebDriver driver;
protected Uri GridUrl;
private Process _webserverProcess;
private const string ServerJarName = "selenium-server-4.32.0.jar";
private const string ServerJarName = "selenium-server-4.33.0.jar";
private static readonly string BaseDirectory = AppContext.BaseDirectory;
private const string RelativePathToGrid = "../../../../../";
private readonly string _examplesDirectory = Path.GetFullPath(Path.Combine(BaseDirectory, RelativePathToGrid));
Expand Down Expand Up @@ -111,4 +111,4 @@ private async Task EnsureGridIsRunningAsync()
}
}
}
}
}
16 changes: 8 additions & 8 deletions examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
using OpenQA.Selenium;
using OpenQA.Selenium.DevTools;
using System.Linq;
using OpenQA.Selenium.DevTools.V132.Network;
using OpenQA.Selenium.DevTools.V132.Performance;
using OpenQA.Selenium.DevTools.V137.Network;
using OpenQA.Selenium.DevTools.V137.Performance;


namespace SeleniumDocs.BiDi.CDP
Expand All @@ -16,7 +16,7 @@ public class NetworkTest : BaseTest
[TestInitialize]
public void Startup()
{
StartDriver("132");
StartDriver("137");
}

[TestMethod]
Expand Down Expand Up @@ -109,9 +109,9 @@ public async Task PerformanceMetrics()
driver.Url = "https://www.selenium.dev/selenium/web/frameset.html";

var session = ((IDevTools)driver).GetDevToolsSession();
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V132.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V137.DevToolsSessionDomains>();

await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V132.Performance.EnableCommandSettings());
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V137.Performance.EnableCommandSettings());
var metricsResponse =
await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
new GetMetricsCommandSettings()
Expand All @@ -130,8 +130,8 @@ await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
public async Task SetCookie()
{
var session = ((IDevTools)driver).GetDevToolsSession();
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V132.DevToolsSessionDomains>();
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V132.Network.EnableCommandSettings());
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V137.DevToolsSessionDomains>();
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V137.Network.EnableCommandSettings());

var cookieCommandSettings = new SetCookieCommandSettings
{
Expand All @@ -148,4 +148,4 @@ public async Task SetCookie()
}

}
}
}
4 changes: 2 additions & 2 deletions examples/dotnet/SeleniumDocs/SeleniumDocs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.7.1" />
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
<PackageReference Include="Selenium.Support" Version="4.31.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.31.0" />
<PackageReference Include="Selenium.Support" Version="4.33.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.33.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.version>4.31.0</selenium.version>
<selenium.version>4.33.0</selenium.version>
</properties>

<repositories>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.HasDevTools;
import org.openqa.selenium.devtools.v134.browser.Browser;
import org.openqa.selenium.devtools.v134.network.Network;
import org.openqa.selenium.devtools.v134.network.model.Headers;
import org.openqa.selenium.devtools.v137.browser.Browser;
import org.openqa.selenium.devtools.v137.network.Network;
import org.openqa.selenium.devtools.v137.network.model.Headers;
import org.openqa.selenium.support.ui.WebDriverWait;

public class CdpApiTest extends BaseTest {
Expand All @@ -27,7 +27,7 @@ public class CdpApiTest extends BaseTest {
@BeforeEach
public void createSession() {
ChromeOptions options = getDefaultChromeOptions();
options.setBrowserVersion("134");
options.setBrowserVersion("136");
driver = new ChromeDriver(options);
wait = new WebDriverWait(driver, Duration.ofSeconds(10));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
import org.openqa.selenium.devtools.DevTools;
import org.openqa.selenium.devtools.HasDevTools;
import org.openqa.selenium.devtools.NetworkInterceptor;
import org.openqa.selenium.devtools.v134.browser.Browser;
import org.openqa.selenium.devtools.v134.network.Network;
import org.openqa.selenium.devtools.v134.performance.Performance;
import org.openqa.selenium.devtools.v134.performance.model.Metric;
import org.openqa.selenium.devtools.v137.browser.Browser;
import org.openqa.selenium.devtools.v137.network.Network;
import org.openqa.selenium.devtools.v137.performance.Performance;
import org.openqa.selenium.devtools.v137.performance.model.Metric;
import org.openqa.selenium.remote.http.*;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public void fullPageScreenshot() throws Exception {

@Test
public void setContext() {
driver = startFirefoxDriver();
driver = startFirefoxDriver(new FirefoxOptions().addArguments("-remote-allow-system-access"));

((HasContext) driver).setContext(FirefoxCommandContext.CHROME);
driver.executeScript("console.log('Inside Chrome context');");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
package dev.selenium.selenium_manager;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class SeleniumManagerUsageDemo {

@Test
@Disabled("This test is just for demo purposes and should not be run in CI")
public void testSetupWithoutManager() {
System.setProperty("webdriver.chrome.driver", "/path/to/chromedriver");
WebDriver driver = new ChromeDriver();
Expand All @@ -20,5 +22,5 @@ public void testSetupWithManager() {
driver.get("https://www.selenium.dev/documentation/selenium_manager/");
driver.quit();
}

}
2 changes: 1 addition & 1 deletion examples/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
selenium==4.31.0
selenium==4.33.0
pytest==8.3.5
trio==0.30.0
pytest-trio==0.8.0
Expand Down
2 changes: 1 addition & 1 deletion examples/python/tests/bidi/cdp/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest
from selenium.webdriver.common.by import By
from selenium.webdriver.common.devtools.v134.network import Headers
from selenium.webdriver.common.devtools.v137.network import Headers


@pytest.mark.trio
Expand Down
7 changes: 5 additions & 2 deletions examples/python/tests/browsers/test_firefox.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,17 @@ def test_full_page_screenshot(firefox_driver):
driver.quit()


def test_set_context(firefox_driver):
driver = firefox_driver
def test_set_context():
options = webdriver.FirefoxOptions()
options.add_argument("-remote-allow-system-access")
driver = webdriver.Firefox(options=options)

with driver.context(driver.CONTEXT_CHROME):
driver.execute_script("console.log('Inside Chrome context');")

# Check if the context is back to content
assert driver.execute("GET_CONTEXT")["value"] == "content"
driver.quit()


def test_firefox_profile():
Expand Down
6 changes: 3 additions & 3 deletions examples/python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def server_old(request):
os.path.abspath(__file__)
)
),
"selenium-server-4.32.0.jar",
"selenium-server-4.33.0.jar",
)

def wait_for_server(url, timeout):
Expand Down Expand Up @@ -206,7 +206,7 @@ def server():
)
)
),
"selenium-server-4.32.0.jar",
"selenium-server-4.33.0.jar",
)

args = [
Expand Down Expand Up @@ -279,7 +279,7 @@ def grid_server():
)
)
),
"selenium-server-4.32.0.jar",
"selenium-server-4.33.0.jar",
)

args = [
Expand Down
4 changes: 2 additions & 2 deletions website_and_docs/content/documentation/selenium_manager.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tabpane text=true >}}
{{% tab header="Java" %}}
**Previously**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L12-L17" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L18-L22" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L20-L24" >}}
{{< /tab >}}
{{% tab header="Python" %}}
**Previously**
Expand Down
4 changes: 2 additions & 2 deletions website_and_docs/content/documentation/selenium_manager.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tabpane text=true >}}
{{% tab header="Java" %}}
**Previously**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L12-L17" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L18-L22" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L20-L24" >}}
{{< /tab >}}
{{% tab header="Python" %}}
**Previously**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tabpane text=true >}}
{{% tab header="Java" %}}
**Previously**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L12-L17" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L18-L22" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L20-L24" >}}
{{< /tab >}}
{{% tab header="Python" %}}
**Previously**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ INFO Browser path: C:\Users\boni\.cache\selenium\chrome\win64\117.0.5938.22\c
{{< tabpane text=true >}}
{{% tab header="Java" %}}
**Previously**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L10-L15" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L12-L17" >}}
**Selenium Manager**
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L18-L22" >}}
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/selenium_manager/SeleniumManagerUsageDemo.java#L20-L24" >}}
{{< /tab >}}
{{% tab header="Python" %}}
**Previously**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ There are several ways to work with Firefox profiles.
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}}
{{< /tab >}}
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L160-L168" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
var options = new FirefoxOptions();
Expand Down Expand Up @@ -445,7 +445,7 @@ please refer to the
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L151-L152" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Firefoxプロファイルを操作するにはいくつかの方法がありま
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}}
{{< /tab >}}
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L160-L168" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
var options = new FirefoxOptions();
Expand Down Expand Up @@ -442,7 +442,7 @@ IDはアドオンインストール時の戻り値から取得できます。
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L151-L152" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Existem várias formas de trabalhar com perfis Firefox
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}}
{{< /tab >}}
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L160-L168" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
var options = new FirefoxOptions();
Expand Down Expand Up @@ -451,7 +451,7 @@ please refer to the
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L151-L152" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ There are several ways to work with Firefox profiles
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L211-L216" >}}
{{< /tab >}}
{{< tab header="Python" text=true >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L157-L165" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L160-L168" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
var options = new FirefoxOptions();
Expand Down Expand Up @@ -448,7 +448,7 @@ please refer to the
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/browsers/FirefoxTest.java#L197-L198" >}}
{{< /tab >}}
{{< tab header="Python" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L149-L150" >}}
{{< gh-codeblock path="/examples/python/tests/browsers/test_firefox.py#L151-L152" >}}
{{< /tab >}}
{{< tab header="CSharp" >}}
{{< badge-code >}}
Expand Down
Loading