Skip to content
Open
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
10 changes: 5 additions & 5 deletions .github/workflows/python-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ jobs:
include:
- os: ubuntu
release: stable
python: '3.9'
python: '3.10'
- os: ubuntu
release: nightly
python: '3.11'
python: '3.14'
- os: windows
release: stable
python: '3.9'
python: '3.10'
- os: windows
release: nightly
python: '3.12'
python: '3.14'
- os: macos
release: stable
python: '3.10'
- os: macos
release: nightly
python: '3.13'
python: '3.14'
runs-on: ${{ format('{0}-latest', matrix.os) }}
steps:
- name: Checkout GitHub repo
Expand Down
14 changes: 7 additions & 7 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.V137.Network;
using OpenQA.Selenium.DevTools.V137.Performance;
using OpenQA.Selenium.DevTools.V142.Network;
using OpenQA.Selenium.DevTools.V142.Performance;


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

[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.V137.DevToolsSessionDomains>();
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V142.DevToolsSessionDomains>();

await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V137.Performance.EnableCommandSettings());
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V142.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.V137.DevToolsSessionDomains>();
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V137.Network.EnableCommandSettings());
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V142.DevToolsSessionDomains>();
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V142.Network.EnableCommandSettings());

var cookieCommandSettings = new SetCookieCommandSettings
{
Expand Down
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.35.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.35.0" />
<PackageReference Include="Selenium.Support" Version="4.38.0" />
<PackageReference Include="Selenium.WebDriver" Version="4.38.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/java/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repositories {
}

dependencies {
testImplementation 'org.seleniumhq.selenium:selenium-java:4.35.0'
testImplementation 'org.seleniumhq.selenium:selenium-java:4.38.0'
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.13.4'
}

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.35.0</selenium.version>
<selenium.version>4.38.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.v137.browser.Browser;
import org.openqa.selenium.devtools.v137.network.Network;
import org.openqa.selenium.devtools.v137.network.model.Headers;
import org.openqa.selenium.devtools.v142.browser.Browser;
import org.openqa.selenium.devtools.v142.network.Network;
import org.openqa.selenium.devtools.v142.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("139");
options.setBrowserVersion("142");
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.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.devtools.v142.browser.Browser;
import org.openqa.selenium.devtools.v142.network.Network;
import org.openqa.selenium.devtools.v142.performance.Performance;
import org.openqa.selenium.devtools.v142.performance.model.Metric;
import org.openqa.selenium.remote.http.*;
import org.openqa.selenium.support.ui.WebDriverWait;

Expand Down
2 changes: 1 addition & 1 deletion examples/kotlin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>

<java.version>11</java.version>
<selenium.version>4.35.0</selenium.version>
<selenium.version>4.38.0</selenium.version>

<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
Expand Down
10 changes: 5 additions & 5 deletions examples/python/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
selenium==4.35.0
pytest==8.4.1
trio==0.30.0
selenium==4.38.0
pytest==8.4.2
trio==0.31.0
pytest-trio==0.8.0
pytest-rerunfailures==15.1
pytest-rerunfailures==16.1
flake8==7.3.0
requests==2.32.5
tox==4.28.4
tox==4.32.0
pytest-xdist==3.8.0
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.v137.network import Headers
from selenium.webdriver.common.devtools.v142.network import Headers


@pytest.mark.trio
Expand Down
3 changes: 3 additions & 0 deletions examples/python/tests/browsers/test_chrome.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import os
import re
import subprocess

import pytest
from selenium import webdriver
from selenium.webdriver.common.by import By


def test_basic_options():
options = get_default_chrome_options()
driver = webdriver.Chrome(options=options)
Expand Down Expand Up @@ -189,6 +191,7 @@ def test_get_browser_logs():
assert any("I am console error" in log['message'] for log in logs), "No matching log message found."
driver.quit()


def get_default_chrome_options():
options = webdriver.ChromeOptions()
options.add_argument("--no-sandbox")
Expand Down
8 changes: 6 additions & 2 deletions examples/python/tests/browsers/test_edge.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import os
import re
import subprocess

import pytest
from selenium import webdriver
from selenium.webdriver.common.by import By


def test_basic_options():
options = get_default_edge_options()

driver = webdriver.Edge(options=options)

driver.quit()
Expand Down Expand Up @@ -73,7 +76,7 @@ def test_log_to_file(log_path):
driver = webdriver.Edge(service=service)

with open(log_path, 'r') as fp:
assert "Starting Microsoft Edge WebDriver" in fp.readline()
assert "Starting" in fp.readline()

driver.quit()

Expand All @@ -84,7 +87,7 @@ def test_log_to_stdout(capfd):
driver = webdriver.Edge(service=service)

out, err = capfd.readouterr()
assert "Starting Microsoft Edge WebDriver" in out
assert "Starting" in out

driver.quit()

Expand Down Expand Up @@ -189,6 +192,7 @@ def test_get_browser_logs():
assert any("I am console error" in log['message'] for log in logs), "No matching log message found."
driver.quit()


def get_default_edge_options():
options = webdriver.EdgeOptions()
options.add_argument("--no-sandbox")
Expand Down
8 changes: 3 additions & 5 deletions examples/python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# virtualenvs. This configuration file will run the test suite on all
# supported python versions. To use it, run "tox" from this directory.
#
# For a specific environment, run: "tox -e <env>" (i.e.: "tox -e py313")
# For a specific environment, run: "tox -e <env>" (i.e.: "tox -e py314")
#
# This tox configuration will skip any Python interpreters that can't be found.
# To manage multiple Python interpreters for covering all versions, you can use
Expand All @@ -11,11 +11,11 @@

[tox]
env_list =
py39
py310
py311
py312
py313
py314
skip_missing_interpreters = True

[testenv]
Expand All @@ -25,6 +25,4 @@ deps =
-r requirements.txt
commands =
# "-vv" means extra verbose
# "-r fEsxXp" means show extra test summary info as specified by:
# (f)ailed, (E)rror, (s)kipped, (x)failed, (X)passed, (p)assed
pytest -vv -r fEsxXp {posargs:.}
pytest -vv -n auto {posargs:.}
4 changes: 2 additions & 2 deletions examples/ruby/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.0'
gem 'rubocop', '~> 1.35'
gem 'rubocop-rspec', '~> 3.0'
gem 'selenium-devtools', '= 0.139.0'
gem 'selenium-webdriver', '= 4.35.0'
gem 'selenium-devtools', '= 0.142.0'
gem 'selenium-webdriver', '= 4.38.0'
12 changes: 6 additions & 6 deletions examples/ruby/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ GEM
rainbow (3.1.1)
rake (13.3.0)
regexp_parser (2.11.2)
rexml (3.4.1)
rexml (3.4.4)
rspec (3.13.1)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand Down Expand Up @@ -49,10 +49,10 @@ GEM
lint_roller (~> 1.1)
rubocop (~> 1.72, >= 1.72.1)
ruby-progressbar (1.13.0)
rubyzip (2.4.1)
selenium-devtools (0.139.0)
rubyzip (3.2.1)
selenium-devtools (0.142.0)
selenium-webdriver (~> 4.2)
selenium-webdriver (4.35.0)
selenium-webdriver (4.38.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
Expand All @@ -77,8 +77,8 @@ DEPENDENCIES
rspec (~> 3.0)
rubocop (~> 1.35)
rubocop-rspec (~> 3.0)
selenium-devtools (= 0.139.0)
selenium-webdriver (= 4.35.0)
selenium-devtools (= 0.142.0)
selenium-webdriver (= 4.38.0)

BUNDLED WITH
2.5.6
4 changes: 2 additions & 2 deletions examples/ruby/spec/browsers/edge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
service.log = file_name

@driver = Selenium::WebDriver.for :edge, service: service
expect(File.readlines(file_name).first).to include('Starting Microsoft Edge WebDriver')
expect(File.readlines(file_name).first).to include('Starting')
end

it 'logs to console' do
Expand All @@ -77,7 +77,7 @@

expect {
@driver = Selenium::WebDriver.for :edge, service: service
}.to output(/Starting Microsoft Edge WebDriver/).to_stdout_from_any_process
}.to output(/Starting/).to_stdout_from_any_process
end

it 'sets log level' do
Expand Down
2 changes: 1 addition & 1 deletion examples/ruby/spec/drivers/remote_webdriver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
let(:target_directory) { File.join(Dir.tmpdir, SecureRandom.uuid) }
let(:wait) { Selenium::WebDriver::Wait.new(timeout: 2) }
let(:server) do
Selenium::Server.new(File.expand_path(File.join('..', '..', '..', 'selenium-server-4.35.0.jar'), __dir__),
Selenium::Server.new(File.expand_path(File.join('..', '..', '..', 'selenium-server-4.38.0.jar'), __dir__),
background: true,
args: %w[--selenium-manager true --enable-managed-downloads true])
end
Expand Down
Loading