Skip to content

Commit e507ba1

Browse files
authored
Merge branch 'trunk' into patch-1
2 parents 50155be + c5b7acc commit e507ba1

27 files changed

+367
-225
lines changed

Diff for: .github/workflows/ruby-examples.yml

+25-6
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,17 @@ jobs:
4141
if: matrix.os != 'windows'
4242
run: |
4343
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
44-
- name: Start Xvfb
45-
if: matrix.os == 'ubuntu'
46-
run: Xvfb :99 &
44+
- name: Setup Fluxbox and Xvfb
45+
if: inputs.os == 'ubuntu'
46+
run: |
47+
sudo apt-get -y install fluxbox libxss1 libappindicator3-1 libindicator7
48+
Xvfb :99 &
49+
fluxbox -display :99 &
50+
echo "DISPLAY=:99" >> "$GITHUB_ENV"
4751
- name: Set up Ruby
4852
uses: ruby/setup-ruby@v1
4953
with:
50-
ruby-version: 3.0
54+
ruby-version: 3.1
5155
bundler-cache: true
5256
- name: Install Gems Nightly non-Windows
5357
if: matrix.release == 'nightly' && matrix.os != 'windows'
@@ -83,11 +87,26 @@ jobs:
8387
with:
8488
distribution: 'temurin'
8589
java-version: 11
86-
- name: Run tests
90+
- name: Run tests on Windows
91+
if: matrix.os == 'windows'
92+
uses: nick-invision/[email protected]
93+
with:
94+
timeout_minutes: 20
95+
max_attempts: 2
96+
command: |
97+
cd examples/ruby
98+
bundle exec rspec
99+
new_command_on_retry: |
100+
cd examples/ruby; $env:DEBUG="true"; bundle exec rspec --only-failures
101+
- name: Run tests on ${{ matrix.os }}
102+
if: matrix.os != 'windows'
87103
uses: nick-invision/[email protected]
88104
with:
89105
timeout_minutes: 20
90-
max_attempts: 3
106+
max_attempts: 2
91107
command: |
92108
cd examples/ruby
93109
bundle exec rspec
110+
new_command_on_retry: |
111+
cd examples/ruby
112+
DEBUG=true bundle exec rspec --only-failures

Diff for: examples/dotnet/SeleniumDocs/BaseTest.cs

+1-1
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.30.0.jar";
20+
private const string ServerJarName = "selenium-server-4.31.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));

Diff for: examples/dotnet/SeleniumDocs/SeleniumDocs.csproj

+2-2
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.30.0" />
14-
<PackageReference Include="Selenium.WebDriver" Version="4.30.0" />
13+
<PackageReference Include="Selenium.Support" Version="4.31.0" />
14+
<PackageReference Include="Selenium.WebDriver" Version="4.31.0" />
1515
</ItemGroup>
1616

1717
<ItemGroup>

Diff for: examples/java/build.gradle

+2-2
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.30.0'
14-
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.12.0'
13+
testImplementation 'org.seleniumhq.selenium:selenium-java:4.31.0'
14+
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.12.1'
1515
}
1616

1717
test {

Diff for: examples/java/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<maven.compiler.source>17</maven.compiler.source>
1414
<maven.compiler.target>17</maven.compiler.target>
1515
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
16-
<selenium.version>4.30.0</selenium.version>
16+
<selenium.version>4.31.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.12.0</version>
43+
<version>5.12.1</version>
4444
<scope>test</scope>
4545
</dependency>
4646
<dependency>
@@ -55,7 +55,7 @@
5555
<plugin>
5656
<groupId>org.apache.maven.plugins</groupId>
5757
<artifactId>maven-surefire-plugin</artifactId>
58-
<version>3.5.2</version>
58+
<version>3.5.3</version>
5959
<configuration>
6060
<properties>
6161
<configurationParameters>

Diff for: examples/javascript/package-lock.json

+7-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: examples/javascript/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"license": "Apache-2.0",
99
"dependencies": {
1010
"assert": "2.1.0",
11-
"selenium-webdriver": "4.30.0"
11+
"selenium-webdriver": "4.31.0"
1212
},
1313
"devDependencies": {
1414
"mocha": "11.1.0"

Diff for: examples/javascript/test/bidirectional/network_events.spec.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const assert = require("assert");
22
const firefox = require('selenium-webdriver/firefox');
3-
const Network = require("selenium-webdriver/bidi/network");
3+
const { Network } = require("selenium-webdriver/bidi/network");
44
const {until, Builder} = require("selenium-webdriver");
55

66

@@ -76,7 +76,7 @@ describe('Network events', function () {
7676
assert.equal(beforeRequestEvent[0].request.method, 'GET')
7777
assert(beforeRequestEvent[0].request.url.includes('redirected_http_equiv.html'))
7878
assert.equal(beforeRequestEvent[2].request.method, 'GET')
79-
assert(beforeRequestEvent[2].request.url.includes('redirected.html'))
79+
assert(beforeRequestEvent[3].request.url.includes('redirected.html'))
8080
})
8181

8282
it('can subscribe to response started', async function () {

Diff for: examples/kotlin/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
<slf4j.version>2.0.17</slf4j.version>
1515
<logback.version>1.5.18</logback.version>
1616

17-
<junit5.version>5.12.0</junit5.version>
17+
<junit5.version>5.12.1</junit5.version>
1818
<wdm.version>5.2.3</wdm.version>
1919

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

2222
<java.version>1.8</java.version>
23-
<selenium.version>4.30.0</selenium.version>
23+
<selenium.version>4.31.0</selenium.version>
2424

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

Diff for: examples/python/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
selenium==4.30.0
1+
selenium==4.31.0
22
pytest==8.3.5
33
trio==0.29.0
44
pytest-trio==0.8.0

Diff for: examples/python/tests/conftest.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def server_old(request):
148148
os.path.abspath(__file__)
149149
)
150150
),
151-
"selenium-server-4.30.0.jar",
151+
"selenium-server-4.31.0.jar",
152152
)
153153

154154
def wait_for_server(url, timeout):
@@ -206,7 +206,7 @@ def server():
206206
)
207207
)
208208
),
209-
"selenium-server-4.30.0.jar",
209+
"selenium-server-4.31.0.jar",
210210
)
211211

212212
args = [
@@ -279,7 +279,7 @@ def grid_server():
279279
)
280280
)
281281
),
282-
"selenium-server-4.30.0.jar",
282+
"selenium-server-4.31.0.jar",
283283
)
284284

285285
args = [

Diff for: examples/ruby/Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ gem 'rspec', '~> 3.0'
88
gem 'rubocop', '~> 1.35'
99
gem 'rubocop-rspec', '~> 3.0'
1010
gem 'selenium-devtools', '= 0.134.0'
11-
gem 'selenium-webdriver', '= 4.30.1'
11+
gem 'selenium-webdriver', '= 4.31.0'

Diff for: examples/ruby/Gemfile.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ GEM
44
ast (2.4.2)
55
base64 (0.2.0)
66
diff-lcs (1.5.1)
7-
json (2.10.1)
7+
json (2.10.2)
88
language_server-protocol (3.17.0.4)
99
lint_roller (1.1.0)
10-
logger (1.6.6)
10+
logger (1.7.0)
1111
parallel (1.26.3)
1212
parser (3.3.7.1)
1313
ast (~> 2.4.1)
@@ -50,7 +50,7 @@ GEM
5050
rubyzip (2.4.1)
5151
selenium-devtools (0.134.0)
5252
selenium-webdriver (~> 4.2)
53-
selenium-webdriver (4.30.1)
53+
selenium-webdriver (4.31.0)
5454
base64 (~> 0.2)
5555
logger (~> 1.4)
5656
rexml (~> 3.2, >= 3.2.5)
@@ -75,7 +75,7 @@ DEPENDENCIES
7575
rubocop (~> 1.35)
7676
rubocop-rspec (~> 3.0)
7777
selenium-devtools (= 0.134.0)
78-
selenium-webdriver (= 4.30.1)
78+
selenium-webdriver (= 4.31.0)
7979

8080
BUNDLED WITH
8181
2.5.6

Diff for: examples/ruby/spec/spec_helper.rb

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
# Disable RSpec exposing methods globally on `Module` and `main`
1111
config.disable_monkey_patching!
12+
Dir.mktmpdir('tmp')
13+
config.example_status_persistence_file_path = "tmp/examples.txt"
1214

1315
config.expect_with :rspec do |c|
1416
c.syntax = :expect
@@ -30,6 +32,7 @@
3032
def start_session
3133
options = Selenium::WebDriver::Chrome::Options.new
3234
options.add_argument('disable-search-engine-choice-screen')
35+
options.add_argument('--no-sandbox')
3336
@driver = Selenium::WebDriver.for(:chrome, options: options)
3437
end
3538

Binary file not shown.

Diff for: website_and_docs/content/documentation/_index.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ a browser. You can find a more comprehensive example in [Writing your first Sele
4242
{{< gh-codeblock path="/examples/dotnet/HelloSelenium.cs" >}}
4343
{{< /tab >}}
4444
{{< tab header="Ruby" >}}
45-
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium_spec.rb" >}}
45+
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium.rb" >}}
4646
{{< /tab >}}
4747
{{< tab header="JavaScript" >}}
4848
{{< gh-codeblock path="/examples/javascript/test/hello/helloSelenium.js" >}}

Diff for: website_and_docs/content/documentation/_index.ja.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Seleniumの中核は[WebDriver]({{< ref "webdriver.md" >}})であり、様々な
2929
{{< gh-codeblock path="/examples/dotnet/HelloSelenium.cs" >}}
3030
{{< /tab >}}
3131
{{< tab header="Ruby" >}}
32-
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium_spec.rb" >}}
32+
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium.rb" >}}
3333
{{< /tab >}}
3434
{{< tab header="JavaScript" >}}
3535
{{< gh-codeblock path="/examples/javascript/test/hello/helloSelenium.js" >}}

Diff for: website_and_docs/content/documentation/_index.pt-br.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ navegadores. Aqui está uma das instruções mais simples que você pode fazer:
4040
{{< gh-codeblock path="/examples/dotnet/HelloSelenium.cs" >}}
4141
{{< /tab >}}
4242
{{< tab header="Ruby" >}}
43-
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium_spec.rb" >}}
43+
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium.rb" >}}
4444
{{< /tab >}}
4545
{{< tab header="JavaScript" >}}
4646
{{< gh-codeblock path="/examples/javascript/test/hello/helloSelenium.js" >}}

Diff for: website_and_docs/content/documentation/_index.zh-cn.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Selenium 的核心是 [WebDriver]({{< ref "webdriver.md" >}}),这是一个编
3434
{{< gh-codeblock path="/examples/dotnet/HelloSelenium.cs" >}}
3535
{{< /tab >}}
3636
{{< tab header="Ruby" >}}
37-
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium_spec.rb" >}}
37+
{{< gh-codeblock path="/examples/ruby/spec/hello/hello_selenium.rb" >}}
3838
{{< /tab >}}
3939
{{< tab header="JavaScript" >}}
4040
{{< gh-codeblock path="/examples/javascript/test/hello/helloSelenium.js" >}}

0 commit comments

Comments
 (0)