Skip to content

Commit 371e07e

Browse files
Merge branch 'SeleniumHQ:trunk' into 2023-11-28/ruby-virtual-authenticator
2 parents 3126bdc + d82c9e8 commit 371e07e

File tree

734 files changed

+35231
-19252
lines changed

Some content is hidden

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

734 files changed

+35231
-19252
lines changed

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: "github-actions"
6+
directory: "/"
7+
schedule:
8+
interval: "daily"

.github/workflows/calibreapp-image-actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
github.event.pull_request.head.repo.full_name == github.repository)
3737
steps:
3838
- name: Checkout Branch
39-
uses: actions/checkout@v3
39+
uses: actions/checkout@v5
4040
- name: Compress Images
4141
id: calibre
4242
uses: calibreapp/image-actions@main
@@ -49,7 +49,7 @@ jobs:
4949
if: |
5050
github.event_name != 'pull_request' &&
5151
steps.calibre.outputs.markdown != ''
52-
uses: peter-evans/create-pull-request@v3
52+
uses: peter-evans/create-pull-request@v7
5353
with:
5454
title: Auto Compress Images
5555
branch-suffix: timestamp

.github/workflows/deploy.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,28 @@ on:
44
push:
55
branches:
66
- trunk
7+
workflow_dispatch:
78

89
jobs:
910
deploy:
10-
if: contains(toJson(github.event.commits), '[deploy site]') == true
11-
runs-on: ubuntu-20.04
11+
if: contains(toJson(github.event.commits), '[deploy site]') == true || github.event_name == 'workflow_dispatch'
12+
runs-on: ubuntu-24.04
1213
steps:
1314
- name: Checkout repo
14-
uses: actions/checkout@v3
15+
uses: actions/checkout@v5
1516
with:
1617
fetch-depth: 0
1718
- name: Setup Hugo
18-
uses: peaceiris/actions-hugo@v2
19+
uses: peaceiris/actions-hugo@v3
1920
with:
20-
hugo-version: '0.110.0'
21+
hugo-version: ' 0.125.4'
2122
extended: true
2223
- name: Build
2324
run: chmod +x build-site.sh && ./build-site.sh
2425
env:
2526
SELENIUM_CI_TOKEN: ${{secrets.SELENIUM_CI_TOKEN}}
2627
- name: Deploy
27-
uses: peaceiris/actions-gh-pages@v3
28+
uses: peaceiris/actions-gh-pages@v4
2829
with:
2930
personal_token: ${{ secrets.SELENIUM_CI_TOKEN }}
3031
publish_dir: ./website_and_docs/public

.github/workflows/dotnet-examples.yml

Lines changed: 46 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,74 @@ env:
2121
GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}
2222

2323
jobs:
24-
test_examples:
24+
tests:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
os: [ ubuntu-latest, windows-latest, macos-latest ]
29-
runs-on: ${{ matrix.os }}
28+
os: [ ubuntu, windows, macos ]
29+
release: [ stable, nightly ]
30+
runs-on: ${{ format('{0}-latest', matrix.os) }}
3031
steps:
3132
- name: Checkout GitHub repo
32-
uses: actions/checkout@v3
33+
uses: actions/checkout@v5
3334
- name: Remove driver directories Windows
34-
if: matrix.os == 'windows-latest'
35+
if: matrix.os == 'windows'
3536
run: |
3637
rm "$env:ChromeWebDriver" -r -v
3738
rm "$env:EdgeWebDriver" -r -v
3839
rm "$env:GeckoWebDriver" -r -v
3940
- name: Remove driver directories Non-Windows
40-
if: matrix.os != 'windows-latest'
41+
if: matrix.os != 'windows'
4142
run: |
4243
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
4344
- name: Start Xvfb
44-
if: matrix.os == 'ubuntu-latest'
45+
if: matrix.os == 'ubuntu'
4546
run: Xvfb :99 &
46-
- name: Set up .Net
47-
uses: actions/setup-dotnet@v3
47+
- name: Set up .Net Stable
48+
if: matrix.release == 'stable'
49+
uses: actions/setup-dotnet@v4
4850
with:
49-
dotnet-version: 6.0.x
51+
dotnet-version: 8.x
52+
- name: Set up .Net Nightly
53+
if: matrix.release == 'nightly'
54+
uses: actions/setup-dotnet@v4
55+
with:
56+
dotnet-version: 8.x
57+
source-url: https://nuget.pkg.github.com/seleniumhq/index.json
58+
env:
59+
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
60+
- name: Update Nightly version non-Windows
61+
if: matrix.release == 'nightly' && matrix.os != 'windows'
62+
run:
63+
|
64+
pip install -r ./scripts/requirements.txt
65+
latest_nightly=$(python ./scripts/latest-nightly-version.py nuget Selenium.WebDriver)
66+
echo $latest_nightly
67+
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.WebDriver --version $latest_nightly
68+
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.Support --version $latest_nightly
69+
env:
70+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71+
- name: Update Nightly version Windows
72+
if: matrix.release == 'nightly' && matrix.os == 'windows'
73+
shell: pwsh
74+
run:
75+
|
76+
pip install -r ./scripts/requirements.txt
77+
$latest_nightly = python ./scripts/latest-nightly-version.py nuget Selenium.WebDriver
78+
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.WebDriver --version $latest_nightly
79+
dotnet add examples/dotnet/SeleniumDocs/SeleniumDocs.csproj package Selenium.Support --version $latest_nightly
80+
env:
81+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5082
- name: Set up Java
51-
uses: actions/setup-java@v3
83+
uses: actions/setup-java@v4
5284
with:
5385
distribution: 'temurin'
5486
java-version: 11
5587
- name: Run tests
56-
uses: nick-invision/retry@v2.8.3
88+
uses: nick-fields/retry@v3.0.2
5789
with:
58-
timeout_minutes: 20
59-
max_attempts: 3
90+
timeout_minutes: 40
91+
max_attempts: 2
6092
command: |
6193
cd examples/dotnet/SeleniumDocs
6294
dotnet test

.github/workflows/java-examples.yml

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,38 +21,87 @@ env:
2121
GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}
2222

2323
jobs:
24-
test_examples:
24+
tests:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
os: [ ubuntu-latest, windows-latest, macos-latest ]
29-
runs-on: ${{ matrix.os }}
28+
os: [ ubuntu, windows, macos ]
29+
release: [ stable, nightly ]
30+
runs-on: ${{ format('{0}-latest', matrix.os) }}
3031
steps:
3132
- name: Checkout GitHub repo
32-
uses: actions/checkout@v3
33+
uses: actions/checkout@v5
3334
- name: Remove driver directories Windows
34-
if: matrix.os == 'windows-latest'
35+
if: matrix.os == 'windows'
3536
run: |
3637
rm "$env:ChromeWebDriver" -r -v
3738
rm "$env:EdgeWebDriver" -r -v
3839
rm "$env:GeckoWebDriver" -r -v
3940
- name: Remove driver directories Non-Windows
40-
if: matrix.os != 'windows-latest'
41+
if: matrix.os != 'windows'
4142
run: |
4243
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
4344
- name: Start Xvfb
44-
if: matrix.os == 'ubuntu-latest'
45+
if: matrix.os == 'ubuntu'
4546
run: Xvfb :99 &
4647
- name: Set up Java
47-
uses: actions/setup-java@v3
48+
id: java
49+
uses: actions/setup-java@v4
4850
with:
4951
distribution: 'temurin'
50-
java-version: 11
51-
- name: Run Tests
52-
uses: nick-invision/[email protected]
52+
java-version: 17
53+
- name: Import test cert non-Windows
54+
if: matrix.os != 'windows'
55+
run: sudo keytool -import -noprompt -trustcacerts -alias SeleniumHQ -file examples/java/src/test/resources/tls.crt -keystore ${{ steps.java.outputs.path }}/lib/security/cacerts -storepass changeit
56+
- name: Import test cert Windows
57+
if: matrix.os == 'windows'
58+
run: keytool -import -noprompt -trustcacerts -alias SeleniumHQ -file examples/java/src/test/resources/tls.crt -keystore ${{ steps.java.outputs.path }}/lib/security/cacerts -storepass changeit
59+
- name: Run Tests Stable
60+
if: matrix.release == 'stable'
61+
uses: nick-invision/[email protected]
5362
with:
54-
timeout_minutes: 20
63+
timeout_minutes: 40
5564
max_attempts: 3
5665
command: |
5766
cd examples/java
58-
mvn -B test
67+
mvn -B test -D"jdk.internal.httpclient.disableHostnameVerification=true"
68+
- name: Run Tests Nightly Linux/macOS
69+
if: matrix.release == 'nightly' && matrix.os != 'windows'
70+
uses: nick-invision/[email protected]
71+
with:
72+
timeout_minutes: 40
73+
max_attempts: 3
74+
command: |
75+
# Get current selenium.version from Maven
76+
current_version=$(mvn -f examples/java/pom.xml help:evaluate -Dexpression=selenium.version -q -DforceStdout)
77+
echo "Current selenium.version: $current_version"
78+
# If version is in the form X.Y.Z, bump minor and set to SNAPSHOT
79+
if [[ $current_version =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
80+
major="${BASH_REMATCH[1]}"
81+
minor="${BASH_REMATCH[2]}"
82+
next_minor=$((minor + 1))
83+
new_version="$major.$next_minor.0-SNAPSHOT"
84+
echo "Using selenium.version $new_version for tests"
85+
cd examples/java
86+
mvn -B -U test -D"jdk.internal.httpclient.disableHostnameVerification=true" -Dselenium.version=$new_version
87+
fi
88+
- name: Run Tests Nightly Windows
89+
if: matrix.release == 'nightly' && matrix.os == 'windows'
90+
uses: nick-invision/[email protected]
91+
with:
92+
timeout_minutes: 40
93+
max_attempts: 3
94+
command: |
95+
# Get current selenium.version from Maven
96+
$current_version = & mvn -f examples/java/pom.xml help:evaluate -Dexpression=selenium.version -q -DforceStdout
97+
Write-Output "Current selenium.version: $current_version"
98+
# If version is in the form X.Y.Z, bump minor and set to SNAPSHOT
99+
if ($current_version -match '^([0-9]+)\.([0-9]+)\.([0-9]+)$') {
100+
$major = $matches[1]
101+
$minor = $matches[2]
102+
$next_minor = [int]$minor + 1
103+
$new_version = "$major.$next_minor.0-SNAPSHOT"
104+
Write-Output "Using selenium.version $new_version for tests"
105+
cd examples/java
106+
mvn -B -U test "-Djdk.internal.httpclient.disableHostnameVerification=true" "-Dselenium.version=$new_version"
107+
}

.github/workflows/js-examples.yml

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -21,70 +21,71 @@ env:
2121
GH_TOKEN: ${{ secrets.SELENIUM_CI_TOKEN }}
2222

2323
jobs:
24-
test_examples:
24+
tests:
2525
strategy:
2626
fail-fast: false
2727
matrix:
28-
os: [ ubuntu-latest, windows-latest, macos-latest ]
29-
runs-on: ${{ matrix.os }}
28+
os: [ ubuntu, windows, macos ]
29+
release: [ stable, nightly ]
30+
runs-on: ${{ format('{0}-latest', matrix.os) }}
3031
steps:
3132
- name: Checkout GitHub repo
32-
uses: actions/checkout@v3
33-
- name: Install Chrome for set binary test
34-
uses: browser-actions/setup-chrome@v1
35-
with:
36-
chrome-version: stable
37-
id: setup-chrome
38-
- name: Install Edge for set binary test
39-
uses: browser-actions/setup-edge@v1
40-
with:
41-
edge-version: stable
42-
id: setup-edge
43-
- name: Install Firefox for set binary test
44-
if: matrix.os != 'windows-latest'
45-
uses: browser-actions/setup-firefox@v1
46-
with:
47-
firefox-version: latest
48-
id: setup-firefox
49-
- name: Set ENV Windows
50-
if: matrix.os == 'windows-latest'
51-
run: |
52-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> $env:GITHUB_ENV
53-
echo "EDGE_BIN=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" >> $env:GITHUB_ENV
54-
echo "FF_BIN=C:\Program Files (x86)\Mozilla Firefox\firefox-browser.exe" >> $env:GITHUB_ENV
55-
- name: Set ENV Mac
56-
if: matrix.os == 'macos-latest'
57-
run: |
58-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
59-
echo "EDGE_BIN=/Users/runner/hostedtoolcache/msedge/stable/x64/Contents/MacOS/Microsoft Edge" >> "$GITHUB_ENV"
60-
echo "FF_BIN=/Users/runner/hostedtoolcache/firefox/latest/x64/Contents/MacOS/firefox" >> "$GITHUB_ENV"
61-
- name: Set ENV Linux
62-
if: matrix.os == 'ubuntu-latest'
63-
run: |
64-
echo "CHROME_BIN=${{ steps.setup-chrome.outputs.chrome-path }}" >> "$GITHUB_ENV"
65-
echo "EDGE_BIN=/opt/hostedtoolcache/msedge/stable/x64/msedge" >> "$GITHUB_ENV"
66-
echo "FF_BIN=/opt/hostedtoolcache/firefox/latest/x64/firefox" >> "$GITHUB_ENV"
33+
uses: actions/checkout@v5
6734
- name: Remove driver directories Windows
68-
if: matrix.os == 'windows-latest'
35+
if: matrix.os == 'windows'
6936
run: |
7037
rm "$env:ChromeWebDriver" -r -v
7138
rm "$env:EdgeWebDriver" -r -v
7239
rm "$env:GeckoWebDriver" -r -v
7340
- name: Remove driver directories Non-Windows
74-
if: matrix.os != 'windows-latest'
41+
if: matrix.os != 'windows'
7542
run: |
7643
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
7744
- name: Start Xvfb
78-
if: matrix.os == 'ubuntu-latest'
45+
if: matrix.os == 'ubuntu'
7946
run: Xvfb :99 &
47+
- name: Setup Node Stable
48+
if: matrix.release == 'stable'
49+
uses: actions/setup-node@v4
50+
with:
51+
node-version: '22.x'
52+
- name: Setup Node Nightly
53+
if: matrix.release == 'nightly'
54+
uses: actions/setup-node@v4
55+
with:
56+
node-version: '22.x'
57+
registry-url: 'https://npm.pkg.github.com'
58+
- name: Use Nightly package.json in Ubuntu/macOS
59+
if: matrix.release == 'nightly' && matrix.os != 'windows'
60+
run:
61+
|
62+
pip install -r ./scripts/requirements.txt
63+
latest_nightly=$(python ./scripts/latest-nightly-version.py npm selenium-webdriver)
64+
echo $latest_nightly
65+
npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly
66+
env:
67+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
- name: Use Nightly package.json in Windows
70+
if: matrix.release == 'nightly' && matrix.os == 'windows'
71+
run:
72+
|
73+
pip install -r ./scripts/requirements.txt
74+
$latest_nightly = python ./scripts/latest-nightly-version.py npm selenium-webdriver
75+
npm install --prefix ./examples/javascript --save selenium-webdriver@npm:@seleniumhq/selenium-webdriver@$latest_nightly
76+
env:
77+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8079
- name: Install Requirements
8180
working-directory: ./examples/javascript
8281
run: npm install
82+
env:
83+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8384
- name: Run tests
84-
uses: nick-invision/retry@v2.8.3
85+
uses: nick-invision/retry@v3.0.2
8586
with:
86-
timeout_minutes: 20
87-
max_attempts: 3
87+
timeout_minutes: 40
88+
max_attempts: 2
8889
command: |
8990
cd examples/javascript
9091
npm test

0 commit comments

Comments
 (0)