Skip to content

Commit c73bb9e

Browse files
authored
Merge branch 'trunk' into elementNotVisibleException
2 parents 45a1645 + de1b1b5 commit c73bb9e

File tree

117 files changed

+2319
-1701
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+2319
-1701
lines changed

.github/workflows/python-examples.yml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,25 @@ jobs:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
os: [ ubuntu, windows, macos ]
29-
release: [ stable, nightly ]
28+
include:
29+
- os: ubuntu
30+
release: stable
31+
python: '3.8'
32+
- os: ubuntu
33+
release: nightly
34+
python: '3.11'
35+
- os: windows
36+
release: stable
37+
python: '3.9'
38+
- os: windows
39+
release: nightly
40+
python: '3.12'
41+
- os: macos
42+
release: stable
43+
python: '3.10'
44+
- os: macos
45+
release: nightly
46+
python: '3.13'
3047
runs-on: ${{ format('{0}-latest', matrix.os) }}
3148
steps:
3249
- name: Checkout GitHub repo
@@ -47,7 +64,7 @@ jobs:
4764
- name: Set up Python
4865
uses: actions/setup-python@v5
4966
with:
50-
python-version: 3.8
67+
python-version: ${{ matrix.python }}
5168
- name: Install dependencies nightly non-Windows
5269
if: matrix.release == 'nightly' && matrix.os != 'windows'
5370
run: |
@@ -80,8 +97,8 @@ jobs:
8097
- name: Run tests
8198
uses: nick-invision/[email protected]
8299
with:
83-
timeout_minutes: 40
100+
timeout_minutes: 60
84101
max_attempts: 3
85102
command: |
86103
cd examples/python
87-
pytest
104+
pytest --reruns 3

examples/dotnet/SeleniumDocs/BaseTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class BaseTest
1717
protected IWebDriver driver;
1818
protected Uri GridUrl;
1919
private Process _webserverProcess;
20-
private const string ServerJarName = "selenium-server-4.26.0.jar";
20+
private const string ServerJarName = "selenium-server-4.27.0.jar";
2121
private static readonly string BaseDirectory = AppContext.BaseDirectory;
2222
private const string RelativePathToGrid = "../../../../../";
2323
private readonly string _examplesDirectory = Path.GetFullPath(Path.Combine(BaseDirectory, RelativePathToGrid));

examples/dotnet/SeleniumDocs/BiDi/CDP/NetworkTest.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
using OpenQA.Selenium;
55
using OpenQA.Selenium.DevTools;
66
using System.Linq;
7-
using OpenQA.Selenium.DevTools.V130.Network;
8-
using OpenQA.Selenium.DevTools.V130.Performance;
7+
using OpenQA.Selenium.DevTools.V131.Network;
8+
using OpenQA.Selenium.DevTools.V131.Performance;
99

1010

1111
namespace SeleniumDocs.BiDi.CDP
@@ -16,7 +16,7 @@ public class NetworkTest : BaseTest
1616
[TestInitialize]
1717
public void Startup()
1818
{
19-
StartDriver("130");
19+
StartDriver("131");
2020
}
2121

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

111111
var session = ((IDevTools)driver).GetDevToolsSession();
112-
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V130.DevToolsSessionDomains>();
112+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V131.DevToolsSessionDomains>();
113113

114-
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V130.Performance.EnableCommandSettings());
114+
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V131.Performance.EnableCommandSettings());
115115
var metricsResponse =
116116
await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
117117
new GetMetricsCommandSettings()
@@ -130,8 +130,8 @@ await session.SendCommand<GetMetricsCommandSettings, GetMetricsCommandResponse>(
130130
public async Task SetCookie()
131131
{
132132
var session = ((IDevTools)driver).GetDevToolsSession();
133-
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V130.DevToolsSessionDomains>();
134-
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V130.Network.EnableCommandSettings());
133+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V131.DevToolsSessionDomains>();
134+
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V131.Network.EnableCommandSettings());
135135

136136
var cookieCommandSettings = new SetCookieCommandSettings
137137
{

examples/dotnet/SeleniumDocs/Interactions/PrintOptionsTest.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,15 @@ public void TestShrinkToFit()
7676
printOptions.ShrinkToFit = true;
7777
bool currentShrinkToFit = printOptions.ShrinkToFit;
7878
}
79-
}
8079

80+
[TestMethod]
81+
public void PrintWithPrintsPageTest()
82+
{
83+
WebDriver driver = new ChromeDriver();
84+
driver.Navigate().GoToUrl("https://www.selenium.dev/");
85+
PrintOptions printOptions = new PrintOptions();
86+
PrintDocument printedPage = driver.Print(printOptions);
87+
Assert.IsTrue(printedPage.AsBase64EncodedString.StartsWith("JVBER"));
88+
}
89+
}
8190
}

examples/dotnet/SeleniumDocs/SeleniumDocs.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.7.1" />
1111
<PackageReference Include="MSTest.TestAdapter" Version="3.6.0" />
1212
<PackageReference Include="MSTest.TestFramework" Version="3.6.0" />
13-
<PackageReference Include="Selenium.Support" Version="4.26.1" />
14-
<PackageReference Include="Selenium.WebDriver" Version="4.26.1" />
13+
<PackageReference Include="Selenium.Support" Version="4.27.0" />
14+
<PackageReference Include="Selenium.WebDriver" Version="4.27.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

examples/java/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ repositories {
1010
}
1111

1212
dependencies {
13-
testImplementation 'org.seleniumhq.selenium:selenium-java:4.26.0'
14-
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.3'
13+
testImplementation 'org.seleniumhq.selenium:selenium-java:4.27.0'
14+
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.4'
1515
}
1616

1717
test {

examples/java/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

examples/java/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
<properties>
1212
<surefire.parallel>1</surefire.parallel>
13-
<maven.compiler.source>11</maven.compiler.source>
14-
<maven.compiler.target>11</maven.compiler.target>
13+
<maven.compiler.source>17</maven.compiler.source>
14+
<maven.compiler.target>17</maven.compiler.target>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16-
<selenium.version>4.26.0</selenium.version>
16+
<selenium.version>4.27.0</selenium.version>
1717
</properties>
1818

1919
<repositories>
@@ -40,7 +40,7 @@
4040
<dependency>
4141
<groupId>org.junit.jupiter</groupId>
4242
<artifactId>junit-jupiter-engine</artifactId>
43-
<version>5.11.3</version>
43+
<version>5.11.4</version>
4444
<scope>test</scope>
4545
</dependency>
4646
<dependency>

examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import org.openqa.selenium.chrome.ChromeOptions;
1717
import org.openqa.selenium.devtools.DevTools;
1818
import org.openqa.selenium.devtools.HasDevTools;
19-
import org.openqa.selenium.devtools.v128.browser.Browser;
20-
import org.openqa.selenium.devtools.v128.network.Network;
21-
import org.openqa.selenium.devtools.v128.network.model.Headers;
19+
import org.openqa.selenium.devtools.v131.browser.Browser;
20+
import org.openqa.selenium.devtools.v131.network.Network;
21+
import org.openqa.selenium.devtools.v131.network.model.Headers;
2222
import org.openqa.selenium.support.ui.WebDriverWait;
2323

2424
public class CdpApiTest extends BaseTest {
@@ -27,7 +27,7 @@ public class CdpApiTest extends BaseTest {
2727
@BeforeEach
2828
public void createSession() {
2929
ChromeOptions options = new ChromeOptions();
30-
options.setBrowserVersion("128");
30+
options.setBrowserVersion("131");
3131
driver = new ChromeDriver(options);
3232
wait = new WebDriverWait(driver, Duration.ofSeconds(10));
3333
}

examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import org.openqa.selenium.devtools.DevTools;
2222
import org.openqa.selenium.devtools.HasDevTools;
2323
import org.openqa.selenium.devtools.NetworkInterceptor;
24-
import org.openqa.selenium.devtools.v128.browser.Browser;
25-
import org.openqa.selenium.devtools.v128.network.Network;
26-
import org.openqa.selenium.devtools.v128.performance.Performance;
27-
import org.openqa.selenium.devtools.v128.performance.model.Metric;
24+
import org.openqa.selenium.devtools.v131.browser.Browser;
25+
import org.openqa.selenium.devtools.v131.network.Network;
26+
import org.openqa.selenium.devtools.v131.performance.Performance;
27+
import org.openqa.selenium.devtools.v131.performance.model.Metric;
2828
import org.openqa.selenium.remote.http.*;
2929
import org.openqa.selenium.support.ui.WebDriverWait;
3030

0 commit comments

Comments
 (0)