Skip to content

Commit c9fe6d1

Browse files
authored
Merge branch 'trunk' into renovate/selenium-devtools-0.x
2 parents 60af416 + a6d9dbf commit c9fe6d1

File tree

18 files changed

+50
-28
lines changed

18 files changed

+50
-28
lines changed

.github/workflows/ruby-examples.yml

Lines changed: 25 additions & 6 deletions
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/retry@v3.0.2
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/retry@v3.0.2
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

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.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>

examples/java/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repositories {
1010
}
1111

1212
dependencies {
13-
testImplementation 'org.seleniumhq.selenium:selenium-java:4.30.0'
13+
testImplementation 'org.seleniumhq.selenium:selenium-java:4.31.0'
1414
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.12.1'
1515
}
1616

examples/java/pom.xml

Lines changed: 1 addition & 1 deletion
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>

examples/javascript/test/bidirectional/network_events.spec.js

Lines changed: 2 additions & 2 deletions
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 () {

examples/kotlin/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
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>

examples/ruby/spec/spec_helper.rb

Lines changed: 3 additions & 0 deletions
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

website_and_docs/content/documentation/_index.en.md

Lines changed: 1 addition & 1 deletion
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" >}}

website_and_docs/content/documentation/_index.ja.md

Lines changed: 1 addition & 1 deletion
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" >}}

0 commit comments

Comments
 (0)