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

+20-3
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/[email protected]
@@ -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

+2-3
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

+3-2
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

+1-1
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

+3-2
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

+3-3
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

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

+1-1
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

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

examples/ruby/spec/spec_support/extensions/webextensions-selenium-example/manifest.json

+9-1
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,17 @@
1414
]
1515
}
1616
],
17+
"permissions": [
18+
"storage",
19+
"scripting"
20+
],
21+
"host_permissions": [
22+
"https://*/*",
23+
"http://*/*"
24+
],
1725
"browser_specific_settings": {
1826
"gecko": {
1927
2028
}
2129
}
22-
}
30+
}

website_and_docs/content/blog/2024/selenium-community-live-episode1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linkTitle: "Selenium Community Live - Episode 1"
44
date: 2024-12-25
55
tags: ["webinar", "meetup", "talks","community"]
66
categories: ["webinar"]
7-
author: <a href="https://www.linkedin.com/in/pallavimuse/" target="_blank">Pallavi Sharma</a>
7+
author: <a href="https://www.linkedin.com/in/musepallavi/" target="_blank">Pallavi Sharma</a>
88
images:
99
description: >
1010
Selenium Community Live - Episode 1

website_and_docs/content/blog/2024/selenium-milestone-20yrs-blog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linkTitle: "Celebrating 20 Years of Selenium"
44
date: 2024-10-18
55
tags: ["webinar", "meetup", "talks"]
66
categories: ["webinar"]
7-
author: <a href="https://www.linkedin.com/in/pallavimuse/" target="_blank">Pallavi Sharma</a>
7+
author: <a href="https://www.linkedin.com/in/musepallavi/" target="_blank">Pallavi Sharma</a>
88
images:
99
- "/images/blog/2024/20-selenium"
1010
description: >
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "Selenium Conference and Appium Conference 2025, Valencia Spain"
3+
linkTitle: "Selenium Conference Appium Conference 2025 Valencia Spain"
4+
date: 2025-04-21
5+
tags: ["conference", "selenium","appium", "web driver ecosystem", "valencia", "spain"]
6+
categories: ["conference"]
7+
author: <a href="https://www.linkedin.com/in/musepallavi/" target="_blank">Pallavi Sharma</a>
8+
images:
9+
description: >
10+
Selenium Conference and Appium Conference 2025, Valencia Spain
11+
---
12+
13+
Selenium and Appium projects joined hands together for the 2025 annual conference of both, which was held from March 26th - March 28th in Valencia, Spain. The official web page of the conference can be found **<a href="https://seleniumconf.com/" target="_blank">here</a>**
14+
15+
The event took place at the beautiful venue of **<a href="https://veleseventsvalencia.es/" target="_blank">Veles e Vents</a>**.
16+
17+
On March 26th, there were **<a href="https://seleniumconf.com/workshops/" target="_blank">Workshops</a>**, which were enthusiastically attended by participants from across the globe. On the 26th March evening, the conference organised Speaker's Dinner, which provided a fun space to sit, talk and know other better.
18+
19+
We are thankful to our esteemed speaker group, who joined us from all over the world and helped make the event a success. Details about the speakers for the event is available here - **<a href="https://seleniumconf.com/speakers/" target="_blank">Speakers of the Conference</a>**
20+
21+
The main event started from 27th of March and ran through 28th March evening. The event was attended by close to 400 global participants. We are thankful to each of them, for their presence which made the event worthwhile.
22+
23+
Conference also provided scholarship to 4 people who were chosen after a tough selection process to attend the conference. We thank all our **<a href="https://seleniumconf.com/sponsor/" target="_blank">Sponsors</a>** who collaborated and helped make the event possible.
24+
25+
The video recording, presentations and photographs from the main event can be found here - **<a href="https://seleniumconf.com/recordings-and-slides/" target="_blank">Videos, Photos and More..</a>**
26+
27+
Conference, also ran Pre Conference webinars which helped showcase high rated talks which couldn't make it to the end program to the audience. The details of the same are available here - **<a href="https://www.youtube.com/@seleniumconf/streams" target="_blank">Pre Conference Webinars</a>**
28+
29+
The conference program chair was **<a href="https://www.linkedin.com/in/diemol/" target="_blank">Diego Molina</a>**. Diego helmed all the activities of the conference with great leadership and meticulous supervision.
30+
31+
The conference was supported by a wide group of professionals who participated in volunteer capacity as reviewers and organizers of the event.
32+
More details about them can be found here - **<a href="https://seleniumconf.com/about/" target="_blank">Organizers & Program Review Committee </a>**.
33+
34+
The entire event was professionally managed by the event organiser company **<a href="https://www.linkedin.com/company/onestic/" target="_blank">OneStic</a>**. They ensured smooth flow of the event. Special mention to **<a href="https://www.linkedin.com/in/jesus-sanchez-martinez-89a62953/" target="_blank">Jesus Sanchez</a>** for going out of the way to ensure everyone was well taken care of.
35+
36+
37+
## Subscribe to Official Selenium Conference YouTube Channel
38+
To explore more about our previous conferences and the next ones don't forget to subscribe to our official You Tube Channel **<a href="https://www.youtube.com/@seleniumconf/featured" target="_blank">Selenium Conference Official YouTube Channel.</a>**
39+

website_and_docs/content/blog/2025/selenium-community-live-episode2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linkTitle: "Selenium Community Live - Episode 2"
44
date: 2025-01-21
55
tags: ["webinar", "meetup", "talks","community"]
66
categories: ["webinar"]
7-
author: <a href="https://www.linkedin.com/in/pallavimuse/" target="_blank">Pallavi Sharma</a>
7+
author: <a href="https://www.linkedin.com/in/musepallavi/" target="_blank">Pallavi Sharma</a>
88
images:
99
description: >
1010
Selenium Community Live - Episode 2

website_and_docs/content/blog/2025/selenium-community-live-episode4.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ linkTitle: "Selenium Community Live - Episode 4"
44
date: 2025-03-19
55
tags: ["webinar", "meetup", "talks","community"]
66
categories: ["webinar"]
7-
author: <a href="https://www.linkedin.com/in/pallavimuse/" target="_blank">Pallavi Sharma</a>
7+
author: <a href="https://www.linkedin.com/in/musepallavi/" target="_blank">Pallavi Sharma</a>
88
images:
99
description: >
1010
Selenium Community Live - Episode 4

website_and_docs/content/documentation/webdriver/getting_started/using_selenium.zh-cn.md

+25-14
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,28 @@ description: >
66
使用IDE和Test Runner库组织Selenium的执行
77
---
88

9-
如果你不仅仅只是想执行一小撮的一次性脚本,你需要能组织和安排好你的代码。这一页会启发你如何真正地使用 Selenium 代码做高效的事情。
9+
如果你不仅仅只是想执行一小撮的一次性脚本,你需要能组织并编排好你的代码。
10+
本章会启发你如何真正地使用 Selenium 代码做高效的事情。
1011

1112
## 常见用法
1213

1314
大部分人使用 Selenium 执行针对 Web 应用的自动化测试,但是 Selenium 其实可以支持任何场景的浏览器自动化。
1415

1516
### 重复性任务
1617

17-
有时候你需要往网站记录日志或者下载一些东西,或者提交一个表单,你可以在预设的时间创建一个 Selenium 脚本去执行一个服务。
18+
有时候你需要往网站记录日志或者下载一些东西,或者提交一个表单,
19+
你可以在预设的时间创建一个 Selenium 脚本去执行一个服务。
1820

1921
### 网页爬虫
2022

21-
你是否期望从一个不提供 API 的网站收集数据?Selenium 可以满足你,但是请确保你了解该网站的服务条例,因为有些网站不允许你这样做,甚至有些网站会屏蔽 Selenium。
23+
你是否期望从一个不提供 API 的网站收集数据?Selenium 可以满足你,
24+
但是请确保你了解该网站的服务条例,
25+
因为有些网站不允许你这样做,甚至有些网站会屏蔽 Selenium。
2226

2327
### 测试
2428

25-
使用 Selenium 做测试需要在 Selenium 执行操作后进行断言,所以一个好的断言类库是很有必要的。至于组织测试用例结构的一些额外特性则需要[Test Runner](#test-runner)来完成。
29+
使用 Selenium 做测试需要在 Selenium 执行操作后进行断言,所以一个好的断言类库是很有必要的。
30+
至于组织测试用例结构的一些额外特性则需要[Test Runner](#test-runner)来完成。
2631

2732
## IDEs
2833

@@ -38,18 +43,21 @@ description: >
3843

3944
## Test Runner
4045

41-
即使不使用 Selenium 做测试,如果你有高级用例,使用一个 test runner 去更好地组织你的代码是很有意义的。学会使用 before/after hooks 和分组执行或者并行执行将会非常有用。
46+
即使不使用 Selenium 做测试,如果你有高级用例,使用一个 test runner 去更好地组织你的代码是很有意义的。
47+
学会使用 before/after hooks 和分组执行或者并行执行将会非常有用。
4248

43-
### 待选
49+
### 候选
4450

4551
有非常多不同的 test runner 可供选择。
4652

47-
这个教程中所有使用到 test runner 的代码示例都可以在我们的示例目录中找到(或者正在被迁移过去),而且这些示例在每一次发版都会被执行,以确保代码是正确的和最新的。下面是一份包含对应链接的 test runner 清单,其中第一项是被这个仓库和本页所有用例所使用的。
53+
这个教程中所有使用到 test runner 的代码示例都可以在我们的示例目录中找到(或者正在被迁移过去),
54+
而且这些示例在每一次发版都会被执行,以确保代码是正确的和最新的。
55+
下面是一份包含对应链接的 test runner 清单,其中第一项是被这个仓库和本页所有用例所使用的。
4856

4957
{{< tabpane text=true >}}
5058
{{% tab header="Java" %}}
5159

52-
- [JUnit](https://junit.org/junit5/) - 个广泛使用的用于基于 Java 的 Selenium 测试的测试框架。
60+
- [JUnit](https://junit.org/junit5/) - 一个广泛使用的用于基于 Java 的 Selenium 测试的测试框架。
5361
- [TestNG](https://testng.org/) - 提供诸如并行测试执行和参数化测试等额外功能。
5462
{{% /tab %}}
5563

@@ -78,14 +86,15 @@ description: >
7886
{{% /tab %}}
7987

8088
{{% tab header="Kotlin" %}}
81-
- [Kotest](https://kotest.io/) - 个灵活且全面的测试框架,专为 Kotlin 设计。
82-
- [JUnit5](https://junit.org/junit5/) -标准的 Java 测试框架,完全兼容 Kotlin。
89+
- [Kotest](https://kotest.io/) - 一个灵活且全面的测试框架,专为 Kotlin 设计。
90+
- [JUnit5](https://junit.org/junit5/) - 标准的 Java 测试框架,完全兼容 Kotlin。
8391
{{% /tab %}}
8492
{{< /tabpane >}}
8593

8694
### 安装
8795

88-
[安装 Selenium 类库]({{< ref "install_library.md" >}})一节中详细说明了需要哪些东西。这里的代码只展示在我们的文档示例项目中用到的示例。
96+
[安装 Selenium 类库]({{< ref "install_library.md" >}})一节中详细说明了需要哪些东西。
97+
这里的代码只展示在我们的文档示例项目中用到的示例。
8998

9099
{{< tabpane text=true >}}
91100
{{% tab header="Java" %}}
@@ -242,7 +251,8 @@ npx mocha runningTests.spec.js
242251

243252
### 示例
244253

245-
[第一个脚本]({{< ref "first_script.md" >}})一节中,我们了解了 Selenium 脚本的每一个组件。这里是使用 test runner 重新组织那个脚本的一个示例:
254+
[第一个脚本]({{< ref "first_script.md" >}})一节中,我们了解了 Selenium 脚本的每一个组件。
255+
这里是使用 test runner 重新组织那个脚本的一个示例:
246256

247257
{{< tabpane text=true >}}
248258
{{< tab header="Java" >}}
@@ -267,6 +277,7 @@ npx mocha runningTests.spec.js
267277

268278
## 下一步
269279

270-
使用你目前所学到的知识建立你自己的 Selenium 代码吧!
280+
使用你目前所学到的知识构建你自己的 Selenium 代码吧!
271281

272-
想要了解更多的功能特性,请继续阅读我们接下来的[WebDriver 教程]({{< ref "/documentation/webdriver/" >}})
282+
想要了解更多的功能特性,
283+
请继续阅读我们接下来的[WebDriver 教程]({{< ref "/documentation/webdriver/" >}})

0 commit comments

Comments
 (0)