Skip to content

Commit 1e858fc

Browse files
committed
Merge branch 'trunk' of https://github.com/AishIngale/seleniumhq.github.io into seleniumChanges
2 parents 4263e45 + 1b716dc commit 1e858fc

File tree

29 files changed

+424
-178
lines changed

29 files changed

+424
-178
lines changed

.github/workflows/link-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: Link check
4444
continue-on-error: true # <- If set to false, run fails with broken links
45-
uses: untitaker/[email protected].32
45+
uses: untitaker/[email protected].42
4646
with:
4747
args: website_and_docs/public/ --check-anchors
4848

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Contributing to the Selenium site and docs
22

3-
Please follow this [link](https://selenium.dev/documentation/about/contributing/)
4-
for all the contribution details.
3+
Please follow this [link](https://selenium.dev/documentation/about/contributing/) for all the contribution details.

GOVERNANCE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Governance
22

3-
Content moved to https://www.selenium.dev/governance/
3+
Content moved to <https://www.selenium.dev/governance/>

README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,31 +25,26 @@ A full contribution guideline can be seen at [contributing](https://selenium.dev
2525

2626
## How to get involved?
2727

28-
Please check all the information available at https://selenium.dev/getinvolved/
28+
Please check all the information available at <https://selenium.dev/getinvolved/>
2929

30-
### Do not want to clone the repository to contribute? Use GitPod.
30+
### Do not want to clone the repository to contribute? Use GitPod
3131

3232
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/SeleniumHQ/seleniumhq.github.io)
3333

34-
3534
## For Selenium Site and Documentation maintainers
3635

3736
### How does the site and docs get build?
3837

3938
GitHub actions runs for every commit on each PR and protected branch. The regular CI execution will
4039
build the site with Hugo to verify that the commit works. The description of these steps can be seen
41-
at the actions configuration file, [one for testing a PR](./.github/workflows/test.yml), and
42-
[one for deploying the site](./.github/workflows/deploy.yml)
40+
at the actions configuration file, [one for testing a PR](./.github/workflows/test.yml), and [one for deploying the site](./.github/workflows/deploy.yml)
4341

4442
### How are the site and docs deployed?
4543

46-
After each CI execution that happens in the `trunk` branch, the script [build-site.sh](./build-site.sh)
47-
is executed for deployment. This script checks for the string `[deploy site]` in the commit message.
44+
After each CI execution that happens in the `trunk` branch, the script [build-site.sh](./build-site.sh) is executed for deployment. This script checks for the string `[deploy site]` in the commit message.
4845

49-
If the commit message contains that string, and the commit is in `trunk`, a
50-
[GitHub action](./.github/workflows/deploy.yml) is triggered to build and deploy the site.
51-
The site and docs will be built, and the changes will be committed to the branch `publish`
52-
by the user [Selenium-CI](https://github.com/selenium-ci/).
46+
If the commit message contains that string, and the commit is in `trunk`, a [GitHub action](./.github/workflows/deploy.yml) is triggered to build and deploy the site.
47+
The site and docs will be built, and the changes will be committed to the branch `publish` by the user [Selenium-CI](https://github.com/selenium-ci/).
5348

5449
*What is important to take into account is that the source files for the site are in the `trunk`
5550
branch, and the files that get deployed are pushed to the `publish` branch.*
@@ -59,11 +54,9 @@ repo [settings](https://github.com/SeleniumHQ/seleniumhq.github.io/settings) (if
5954
you should be able to access the link).
6055

6156
The selenium.
62-
domain is managed at https://www.gandi.net/en, if you need access to it, reach out to
63-
any of the [PLC](https://www.selenium.dev/project/structure/#plc) or [TLC](https://www.selenium.dev/project/structure/#tlc)
57+
domain is managed at <https://www.gandi.net/en>, if you need access to it, reach out to any of the [PLC](https://www.selenium.dev/project/structure/#plc) or [TLC](https://www.selenium.dev/project/structure/#tlc)
6458
members, who can help you with that.
6559

6660
If for any reason, you need to setup the domain redirection again,
6761
we followed this [guide](http://spector.io/how-to-set-up-github-pages-with-a-custom-domain-on-gandi/),
68-
but any tutorial/guide showing how to redirect a domain to GitHub pages should do.
69-
62+
but any tutorial/guide showing how to redirect a domain to GitHub pages should do.

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.25.0.jar";
20+
private const string ServerJarName = "selenium-server-4.26.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.V129.Network;
8-
using OpenQA.Selenium.DevTools.V129.Performance;
7+
using OpenQA.Selenium.DevTools.V130.Network;
8+
using OpenQA.Selenium.DevTools.V130.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("129");
19+
StartDriver("130");
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.V129.DevToolsSessionDomains>();
112+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V130.DevToolsSessionDomains>();
113113

114-
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V129.Performance.EnableCommandSettings());
114+
await domains.Performance.Enable(new OpenQA.Selenium.DevTools.V13.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.V129.DevToolsSessionDomains>();
134-
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V129.Network.EnableCommandSettings());
133+
var domains = session.GetVersionSpecificDomains<OpenQA.Selenium.DevTools.V130.DevToolsSessionDomains>();
134+
await domains.Network.Enable(new OpenQA.Selenium.DevTools.V130.Network.EnableCommandSettings());
135135

136136
var cookieCommandSettings = new SetCookieCommandSettings
137137
{

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.25.0'
14-
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.2'
13+
testImplementation 'org.seleniumhq.selenium:selenium-java:4.26.0'
14+
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.11.3'
1515
}
1616

1717
test {

examples/java/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<maven.compiler.source>11</maven.compiler.source>
1414
<maven.compiler.target>11</maven.compiler.target>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16-
<selenium.version>4.25.0</selenium.version>
16+
<selenium.version>4.26.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.2</version>
43+
<version>5.11.3</version>
4444
<scope>test</scope>
4545
</dependency>
4646
<dependency>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package dev.selenium.interactions;
2+
3+
import org.openqa.selenium.Pdf;
4+
import org.openqa.selenium.bidi.browsingcontext.BrowsingContext;
5+
import org.junit.jupiter.api.Test;
6+
import org.junit.jupiter.api.Assertions;
7+
import org.junit.jupiter.api.BeforeEach;
8+
import org.openqa.selenium.print.PageMargin;
9+
import org.openqa.selenium.print.PrintOptions;
10+
import org.openqa.selenium.chrome.ChromeOptions;
11+
import org.openqa.selenium.chrome.ChromeDriver;
12+
import org.openqa.selenium.PrintsPage;
13+
import dev.selenium.BaseTest;
14+
15+
public class PrintsPageTest extends BaseTest{
16+
17+
@BeforeEach
18+
public void setup() {
19+
ChromeOptions options = new ChromeOptions();
20+
options.setCapability("webSocketUrl", true);
21+
driver = new ChromeDriver(options);
22+
}
23+
24+
@Test
25+
public void PrintWithPrintsPageTest()
26+
{
27+
driver.get("https://www.selenium.dev/");
28+
PrintsPage printer = (PrintsPage) driver;
29+
PrintOptions printOptions = new PrintOptions();
30+
Pdf printedPage = printer.print(printOptions);
31+
Assertions.assertNotNull(printedPage);
32+
}
33+
34+
@Test
35+
public void PrintWithBrowsingContextTest()
36+
{
37+
BrowsingContext browsingContext = new BrowsingContext(driver, driver.getWindowHandle());
38+
driver.get("https://www.selenium.dev/selenium/web/formPage.html");
39+
PrintOptions printOptions = new PrintOptions();
40+
String printPage = browsingContext.print(printOptions);
41+
Assertions.assertTrue(printPage.length() > 0);
42+
}
43+
}

examples/kotlin/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<kotlin.version>2.0.21</kotlin.version>
1313

1414
<slf4j.version>2.0.16</slf4j.version>
15-
<logback.version>1.5.11</logback.version>
15+
<logback.version>1.5.12</logback.version>
1616

17-
<junit5.version>5.11.2</junit5.version>
17+
<junit5.version>5.11.3</junit5.version>
1818
<wdm.version>5.2.3</wdm.version>
1919

2020
<maven-surefire-plugin.version>3.5.1</maven-surefire-plugin.version>
2121

2222
<java.version>1.8</java.version>
23-
<selenium.version>4.25.0</selenium.version>
23+
<selenium.version>4.26.0</selenium.version>
2424

2525
<maven.compiler.target>${java.version}</maven.compiler.target>
2626
<maven.compiler.source>${java.version}</maven.compiler.source>

examples/python/tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def server_old(request):
140140
os.path.abspath(__file__)
141141
)
142142
),
143-
"selenium-server-4.25.0.jar",
143+
"selenium-server-4.26.0.jar",
144144
)
145145

146146
def wait_for_server(url, timeout):
@@ -198,7 +198,7 @@ def server():
198198
)
199199
)
200200
),
201-
"selenium-server-4.25.0.jar",
201+
"selenium-server-4.26.0.jar",
202202
)
203203

204204
args = [

examples/python/tests/drivers/test_options.py

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,95 +5,101 @@
55

66
def test_page_load_strategy_normal():
77
options = webdriver.ChromeOptions()
8-
98
options.page_load_strategy = 'normal'
109
driver = webdriver.Chrome(options=options)
11-
1210
driver.get("https://www.selenium.dev/")
1311
driver.quit()
1412

1513

1614
def test_page_load_strategy_eager():
1715
options = webdriver.ChromeOptions()
18-
1916
options.page_load_strategy = 'eager'
2017
driver = webdriver.Chrome(options=options)
21-
2218
driver.get("https://www.selenium.dev/")
2319
driver.quit()
2420

2521

2622
def test_page_load_strategy_none():
2723
options = webdriver.ChromeOptions()
28-
2924
options.page_load_strategy = 'none'
3025
driver = webdriver.Chrome(options=options)
31-
32-
driver.get("https://www.selenium.dev/")
33-
driver.quit()
34-
35-
def test_capabilities():
36-
options = webdriver.ChromeOptions()
37-
options.browser_version = 'stable'
38-
options.platform_name = 'any'
39-
options.accept_insecure_certs = True
40-
driver = webdriver.Chrome(options=options)
41-
4226
driver.get("https://www.selenium.dev/")
4327
driver.quit()
4428

4529
def test_timeouts_script():
4630
options = webdriver.ChromeOptions()
4731
options.timeouts = { 'script': 5000 }
4832
driver = webdriver.Chrome(options=options)
49-
5033
driver.get("https://www.selenium.dev/")
5134
driver.quit()
5235

5336
def test_timeouts_page_load():
5437
options = webdriver.ChromeOptions()
5538
options.timeouts = { 'pageLoad': 5000 }
5639
driver = webdriver.Chrome(options=options)
57-
5840
driver.get("https://www.selenium.dev/")
5941
driver.quit()
6042

6143
def test_timeouts_implicit_wait():
6244
options = webdriver.ChromeOptions()
6345
options.timeouts = { 'implicit': 5000 }
6446
driver = webdriver.Chrome(options=options)
65-
6647
driver.get("https://www.selenium.dev/")
6748
driver.quit()
6849

6950
def test_unhandled_prompt():
7051
options = webdriver.ChromeOptions()
7152
options.unhandled_prompt_behavior = 'accept'
7253
driver = webdriver.Chrome(options=options)
73-
7454
driver.get("https://www.selenium.dev/")
7555
driver.quit()
7656

7757
def test_set_window_rect():
7858
options = webdriver.FirefoxOptions()
7959
options.set_window_rect = True # Full support in Firefox
8060
driver = webdriver.Firefox(options=options)
81-
8261
driver.get("https://www.selenium.dev/")
8362
driver.quit()
8463

8564
def test_strict_file_interactability():
8665
options = webdriver.ChromeOptions()
8766
options.strict_file_interactability = True
8867
driver = webdriver.Chrome(options=options)
89-
9068
driver.get("https://www.selenium.dev/")
9169
driver.quit()
9270

9371
def test_proxy():
9472
options = webdriver.ChromeOptions()
9573
options.proxy = Proxy({ 'proxyType': ProxyType.MANUAL, 'httpProxy' : 'http.proxy:1234'})
9674
driver = webdriver.Chrome(options=options)
97-
9875
driver.get("https://www.selenium.dev/")
99-
driver.quit()
76+
driver.quit()
77+
78+
def test_set_browser_name():
79+
options = webdriver.ChromeOptions()
80+
assert options.capabilities['browserName'] == 'chrome'
81+
driver = webdriver.Chrome(options=options)
82+
driver.get("https://www.selenium.dev/")
83+
driver.quit()
84+
85+
def test_set_browser_version():
86+
options = webdriver.ChromeOptions()
87+
options.browser_version = 'latest'
88+
assert options.capabilities['browserVersion'] == 'latest'
89+
driver = webdriver.Chrome(options=options)
90+
driver.get("https://www.selenium.dev/")
91+
driver.quit()
92+
93+
def test_platform_name():
94+
options = webdriver.ChromeOptions()
95+
options.platform_name = 'any'
96+
driver = webdriver.Chrome(options=options)
97+
driver.get("https://www.selenium.dev/")
98+
driver.quit()
99+
100+
def test_accept_insecure_certs():
101+
options = webdriver.ChromeOptions()
102+
options.accept_insecure_certs = True
103+
driver = webdriver.Chrome(options=options)
104+
driver.get("https://www.selenium.dev/")
105+
driver.quit()
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import pytest
2+
from selenium import webdriver
3+
from selenium.webdriver.common.print_page_options import PrintOptions
4+
5+
pytest.fixture()
6+
def driver():
7+
driver = webdriver.Chrome()
8+
yield driver
9+
driver.quit()
10+
11+
def test_prints_page(driver):
12+
driver.get("https://www.selenium.dev/")
13+
print_options = PrintOptions()
14+
pdf = driver.print_page(print_options)
15+
assert len(pdf) > 0

examples/ruby/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ gem 'rake', '~> 13.0'
77
gem 'rspec', '~> 3.0'
88
gem 'rubocop', '~> 1.35'
99
gem 'rubocop-rspec', '~> 3.0'
10-
gem 'selenium-devtools', '= 0.129.0'
10+
gem 'selenium-devtools', '= 0.130.0'
1111
gem 'selenium-webdriver', '= 4.25.0'

0 commit comments

Comments
 (0)