Skip to content

Commit 50e6078

Browse files
authored
Merge branch 'trunk' into trunk
2 parents ec750ea + 9faeb70 commit 50e6078

File tree

19 files changed

+123
-43
lines changed

19 files changed

+123
-43
lines changed

.github/workflows/ruby-examples.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: |
4343
sudo rm -rf $CHROMEWEBDRIVER $EDGEWEBDRIVER $GECKOWEBDRIVER
4444
- name: Setup Fluxbox and Xvfb
45-
if: inputs.os == 'ubuntu'
45+
if: matrix.os == 'ubuntu'
4646
run: |
4747
sudo apt-get -y install fluxbox libxss1 libappindicator3-1 libindicator7
4848
Xvfb :99 &
@@ -97,7 +97,7 @@ jobs:
9797
cd examples/ruby
9898
bundle exec rspec
9999
new_command_on_retry: |
100-
cd examples/ruby; $env:DEBUG="true"; bundle exec rspec --only-failures
100+
cd examples/ruby; $env:DEBUG="true"; bundle exec rspec --only-failures --backtrace
101101
- name: Run tests on ${{ matrix.os }}
102102
if: matrix.os != 'windows'
103103
uses: nick-invision/retry@v3.0.2
@@ -109,4 +109,21 @@ jobs:
109109
bundle exec rspec
110110
new_command_on_retry: |
111111
cd examples/ruby
112-
DEBUG=true bundle exec rspec --only-failures
112+
DEBUG=true bundle exec rspec --only-failures --backtrace
113+
114+
lint:
115+
runs-on: ubuntu-latest
116+
steps:
117+
- name: Checkout GitHub repo
118+
uses: actions/checkout@v4
119+
- name: Set up Ruby
120+
uses: ruby/setup-ruby@v1
121+
with:
122+
ruby-version: 3.1
123+
bundler-cache: true
124+
- name: Install dependencies
125+
working-directory: ./examples/ruby
126+
run: bundle install
127+
- name: Run RuboCop
128+
working-directory: ./examples/ruby
129+
run: bundle exec rubocop

examples/kotlin/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@
99
<version>1.0.0</version>
1010

1111
<properties>
12-
<kotlin.version>2.1.0</kotlin.version>
12+
<kotlin.version>2.1.20</kotlin.version>
1313

1414
<slf4j.version>2.0.17</slf4j.version>
1515
<logback.version>1.5.18</logback.version>
1616

1717
<junit5.version>5.12.1</junit5.version>
18-
<wdm.version>5.2.3</wdm.version>
1918

2019
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
2120

22-
<java.version>1.8</java.version>
21+
<java.version>11</java.version>
2322
<selenium.version>4.31.0</selenium.version>
2423

2524
<maven.compiler.target>${java.version}</maven.compiler.target>

examples/ruby/.rubocop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
inherit_from: .rubocop_todo.yml
22

3-
require: rubocop-rspec
3+
plugins:
4+
- rubocop-rspec
45

56
AllCops:
6-
TargetRubyVersion: 3.0
7+
TargetRubyVersion: 3.1
78
NewCops: enable
89
SuggestExtensions:
910
rubocop-rake: false

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.134.0'
10+
gem 'selenium-devtools', '= 0.135.0'
1111
gem 'selenium-webdriver', '= 4.31.0'

examples/ruby/Gemfile.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ GEM
4848
rubocop (~> 1.72, >= 1.72.1)
4949
ruby-progressbar (1.13.0)
5050
rubyzip (2.4.1)
51-
selenium-devtools (0.134.0)
51+
selenium-devtools (0.135.0)
5252
selenium-webdriver (~> 4.2)
5353
selenium-webdriver (4.31.0)
5454
base64 (~> 0.2)
@@ -64,6 +64,7 @@ PLATFORMS
6464
arm64-darwin-22
6565
arm64-darwin-23
6666
arm64-darwin-24
67+
ruby
6768
x86_64-darwin-19
6869
x86_64-darwin-20
6970
x86_64-darwin-22
@@ -74,7 +75,7 @@ DEPENDENCIES
7475
rspec (~> 3.0)
7576
rubocop (~> 1.35)
7677
rubocop-rspec (~> 3.0)
77-
selenium-devtools (= 0.134.0)
78+
selenium-devtools (= 0.135.0)
7879
selenium-webdriver (= 4.31.0)
7980

8081
BUNDLED WITH

examples/ruby/spec/browsers/firefox_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
describe 'Features' do
9090
let(:driver) { start_firefox }
9191

92-
it 'installs addon', :skip => "Skipping tests until Firefox 127 is released" do
92+
it 'installs addon' do
9393
extension_file_path = File.expand_path('../spec_support/extensions/webextensions-selenium-example.xpi', __dir__)
9494

9595
driver.install_addon(extension_file_path)
@@ -99,7 +99,7 @@
9999
expect(injected.text).to eq 'Content injected by webextensions-selenium-example'
100100
end
101101

102-
it 'uninstalls addon', :skip => "Skipping tests until Firefox 127 is released" do
102+
it 'uninstalls addon' do
103103
extension_file_path = File.expand_path('../spec_support/extensions/webextensions-selenium-example.xpi', __dir__)
104104
extension_id = driver.install_addon(extension_file_path)
105105

@@ -109,7 +109,7 @@
109109
expect(driver.find_elements(id: 'webextensions-selenium-example')).to be_empty
110110
end
111111

112-
it 'installs unsigned addon', :skip => "Skipping tests until Firefox 127 is released" do
112+
it 'installs unsigned addon' do
113113
extension_dir_path = File.expand_path('../spec_support/extensions/webextensions-selenium-example/', __dir__)
114114

115115
driver.install_addon(extension_dir_path, true)

examples/ruby/spec/elements/finders_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@
1212

1313
it 'uses a subset of the dom to find an element' do
1414
fruits = driver.find_element(id: 'fruits')
15-
fruit = fruits.find_element(class: 'tomatoes')
15+
fruits.find_element(class: 'tomatoes')
1616
end
1717

1818
it 'uses an optimized locator' do
19-
fruit = driver.find_element(css: '#fruits .tomatoes')
19+
driver.find_element(css: '#fruits .tomatoes')
2020
end
2121

2222
it 'finds all matching elements' do
23-
plants = driver.find_elements(tag_name: 'li')
23+
driver.find_elements(tag_name: 'li')
2424
end
2525

2626
it 'gets an element from a collection' do
27-
elements = driver.find_elements(:tag_name,'p')
27+
elements = driver.find_elements(:tag_name, 'p')
2828
elements.each { |e| puts e.text }
2929
end
3030

3131
it 'finds element from element' do
32-
element = driver.find_element(:tag_name,'div')
33-
elements = element.find_elements(:tag_name,'p')
32+
element = driver.find_element(:tag_name, 'div')
33+
elements = element.find_elements(:tag_name, 'p')
3434
elements.each { |e| puts e.text }
3535
end
3636

3737
it 'find active element' do
3838
driver.find_element(css: '[name="q"]').send_keys('webElement')
39-
attr = driver.switch_to.active_element.attribute('title')
39+
driver.switch_to.active_element.attribute('title')
4040
end
4141
end
4242
end

examples/ruby/spec/getting_started/using_selenium_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# frozen_string_literal: true
2+
23
require 'spec_helper'
34
require 'selenium-webdriver'
45

5-
66
RSpec.describe 'Using Selenium' do
77
before do
88
@driver = Selenium::WebDriver.for :chrome

examples/ruby/spec/spec_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
# Disable RSpec exposing methods globally on `Module` and `main`
1111
config.disable_monkey_patching!
1212
Dir.mktmpdir('tmp')
13-
config.example_status_persistence_file_path = "tmp/examples.txt"
13+
config.example_status_persistence_file_path = 'tmp/examples.txt'
1414

1515
config.expect_with :rspec do |c|
1616
c.syntax = :expect
1717
end
1818

1919
config.before do |example|
20-
bug_tracker = 'https://gigithub.com/SeleniumHQ/seleniumhq.github.io/issues'
20+
bug_tracker = 'https://github.com/SeleniumHQ/seleniumhq.github.io/issues'
2121
guards = Selenium::WebDriver::Support::Guards.new(example,
2222
bug_tracker: bug_tracker)
2323
guards.add_condition(:platform, Selenium::WebDriver::Platform.os)
Binary file not shown.

0 commit comments

Comments
 (0)