Skip to content

Commit 677506b

Browse files
authored
Merge branch 'trunk' into petesong/add-practice-example
2 parents 1f076a5 + 82441ce commit 677506b

36 files changed

+305
-517
lines changed

.github/workflows/link-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Node
2828
uses: actions/setup-node@v4
2929
with:
30-
node-version: '18.14.2'
30+
node-version: '18.20.8'
3131
cache: 'npm'
3232
# The action defaults to search for the dependency file (package-lock.json,
3333
# npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its

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

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

1717
<ItemGroup>

examples/java/build.gradle

+1-1
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.29.0'
13+
testImplementation 'org.seleniumhq.selenium:selenium-java:4.30.0'
1414
testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.12.0'
1515
}
1616

examples/java/pom.xml

+1-1
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.29.0</selenium.version>
16+
<selenium.version>4.30.0</selenium.version>
1717
</properties>
1818

1919
<repositories>

examples/java/src/test/java/dev/selenium/bidi/cdp/CdpApiTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import org.openqa.selenium.chrome.ChromeOptions;
1717
import org.openqa.selenium.devtools.DevTools;
1818
import org.openqa.selenium.devtools.HasDevTools;
19-
import org.openqa.selenium.devtools.v131.browser.Browser;
20-
import org.openqa.selenium.devtools.v131.network.Network;
21-
import org.openqa.selenium.devtools.v131.network.model.Headers;
19+
import org.openqa.selenium.devtools.v134.browser.Browser;
20+
import org.openqa.selenium.devtools.v134.network.Network;
21+
import org.openqa.selenium.devtools.v134.network.model.Headers;
2222
import org.openqa.selenium.support.ui.WebDriverWait;
2323

2424
public class CdpApiTest extends BaseTest {
@@ -27,7 +27,7 @@ public class CdpApiTest extends BaseTest {
2727
@BeforeEach
2828
public void createSession() {
2929
ChromeOptions options = getDefaultChromeOptions();
30-
options.setBrowserVersion("131");
30+
options.setBrowserVersion("134");
3131
driver = new ChromeDriver(options);
3232
wait = new WebDriverWait(driver, Duration.ofSeconds(10));
3333
}

examples/java/src/test/java/dev/selenium/bidi/cdp/NetworkTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121
import org.openqa.selenium.devtools.DevTools;
2222
import org.openqa.selenium.devtools.HasDevTools;
2323
import org.openqa.selenium.devtools.NetworkInterceptor;
24-
import org.openqa.selenium.devtools.v131.browser.Browser;
25-
import org.openqa.selenium.devtools.v131.network.Network;
26-
import org.openqa.selenium.devtools.v131.performance.Performance;
27-
import org.openqa.selenium.devtools.v131.performance.model.Metric;
24+
import org.openqa.selenium.devtools.v134.browser.Browser;
25+
import org.openqa.selenium.devtools.v134.network.Network;
26+
import org.openqa.selenium.devtools.v134.performance.Performance;
27+
import org.openqa.selenium.devtools.v134.performance.model.Metric;
2828
import org.openqa.selenium.remote.http.*;
2929
import org.openqa.selenium.support.ui.WebDriverWait;
3030

examples/javascript/package-lock.json

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

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.29.0"
11+
"selenium-webdriver": "4.30.0"
1212
},
1313
"devDependencies": {
1414
"mocha": "11.1.0"

examples/kotlin/pom.xml

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
<kotlin.version>2.1.0</kotlin.version>
1313

1414
<slf4j.version>2.0.17</slf4j.version>
15-
<logback.version>1.5.17</logback.version>
15+
<logback.version>1.5.18</logback.version>
1616

1717
<junit5.version>5.12.0</junit5.version>
1818
<wdm.version>5.2.3</wdm.version>
1919

20-
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
20+
<maven-surefire-plugin.version>3.5.3</maven-surefire-plugin.version>
2121

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

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

examples/kotlin/src/test/kotlin/dev/selenium/actions_api/ActionsTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class ActionsTest : BaseTest() {
4747
(driver as RemoteWebDriver).resetInputState()
4848

4949
actions.sendKeys("a").perform()
50-
Assertions.assertEquals("A", clickable.getAttribute("value").get(0).toString())
51-
Assertions.assertEquals("a", clickable.getAttribute("value").get(1).toString())
50+
Assertions.assertEquals("A", clickable.getAttribute("value")!!.get(0).toString())
51+
Assertions.assertEquals("a", clickable.getAttribute("value")!!.get(1).toString())
5252
}
5353
}

examples/kotlin/src/test/kotlin/dev/selenium/actions_api/MouseTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class MouseTest : BaseTest() {
3737
.click(clickable)
3838
.perform()
3939

40-
Assertions.assertTrue(driver.getCurrentUrl().contains("resultPage.html"))
40+
Assertions.assertTrue(driver.getCurrentUrl()!!.contains("resultPage.html"))
4141
}
4242

4343
@Test

examples/python/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
selenium==4.29.0
1+
selenium==4.30.0
22
pytest==8.3.5
33
trio==0.29.0
44
pytest-trio==0.8.0
5-
pytest-rerunfailures==14.0
6-
flake8==7.1.2
5+
pytest-rerunfailures==15.0
6+
flake8==7.2.0
77
requests==2.32.3

examples/python/tests/bidi/cdp/test_network.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44
from selenium.webdriver.common.by import By
5-
from selenium.webdriver.common.devtools.v131.network import Headers
5+
from selenium.webdriver.common.devtools.v134.network import Headers
66

77

88
@pytest.mark.trio

examples/python/tests/conftest.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
from selenium import webdriver
1515

1616

17+
def pytest_configure(config):
18+
config.addinivalue_line(
19+
"markers", "driver_type(type): marks tests to use driver type ('bidi', 'firefox', etc)"
20+
)
21+
22+
1723
@pytest.fixture(scope='function')
1824
def driver(request):
1925
marker = request.node.get_closest_marker("driver_type")
@@ -142,7 +148,7 @@ def server_old(request):
142148
os.path.abspath(__file__)
143149
)
144150
),
145-
"selenium-server-4.29.0.jar",
151+
"selenium-server-4.30.0.jar",
146152
)
147153

148154
def wait_for_server(url, timeout):
@@ -200,7 +206,7 @@ def server():
200206
)
201207
)
202208
),
203-
"selenium-server-4.29.0.jar",
209+
"selenium-server-4.30.0.jar",
204210
)
205211

206212
args = [
@@ -273,7 +279,7 @@ def grid_server():
273279
)
274280
)
275281
),
276-
"selenium-server-4.29.0.jar",
282+
"selenium-server-4.30.0.jar",
277283
)
278284

279285
args = [
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,55 @@
1+
# Licensed to the Software Freedom Conservancy (SFC) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The SFC licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
# Unless required by applicable law or agreed to in writing,
11+
# software distributed under the License is distributed on an
12+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
13+
# KIND, either express or implied. See the License for the
14+
# specific language governing permissions and limitations
15+
# under the License.
16+
117
from selenium import webdriver
18+
from selenium.webdriver.common.by import By
19+
20+
#set chrome and launch web page
21+
driver = webdriver.Chrome()
22+
driver.get("https://www.selenium.dev/selenium/web/iframes.html")
23+
24+
# --- Switch to iframe using WebElement ---
25+
iframe = driver.find_element(By.ID, "iframe1")
26+
driver.switch_to.frame(iframe)
27+
assert "We Leave From Here" in driver.page_source
28+
29+
email_element = driver.find_element(By.ID, "email")
30+
email_element.send_keys("[email protected]")
31+
email_element.clear()
32+
driver.switch_to.default_content()
33+
34+
# --- Switch to iframe using name or ID ---
35+
iframe1=driver.find_element(By.NAME, "iframe1-name") # (This line doesn't switch, just locates)
36+
driver.switch_to.frame(iframe)
37+
assert "We Leave From Here" in driver.page_source
38+
39+
email = driver.find_element(By.ID, "email")
40+
email.send_keys("[email protected]")
41+
email.clear()
42+
driver.switch_to.default_content()
43+
44+
# --- Switch to iframe using index ---
45+
driver.switch_to.frame(0)
46+
assert "We Leave From Here" in driver.page_source
47+
48+
# --- Final page content check ---
49+
driver.switch_to.default_content()
50+
assert "This page has iframes" in driver.page_source
51+
52+
#quit the driver
53+
driver.quit()
254

55+
#demo code for conference

examples/ruby/Gemfile

+2-2
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.133.0'
11-
gem 'selenium-webdriver', '= 4.29.1'
10+
gem 'selenium-devtools', '= 0.134.0'
11+
gem 'selenium-webdriver', '= 4.30.1'

examples/ruby/Gemfile.lock

+5-4
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ GEM
4848
rubocop (~> 1.72, >= 1.72.1)
4949
ruby-progressbar (1.13.0)
5050
rubyzip (2.4.1)
51-
selenium-devtools (0.133.0)
51+
selenium-devtools (0.134.0)
5252
selenium-webdriver (~> 4.2)
53-
selenium-webdriver (4.29.1)
53+
selenium-webdriver (4.30.1)
5454
base64 (~> 0.2)
5555
logger (~> 1.4)
5656
rexml (~> 3.2, >= 3.2.5)
@@ -63,6 +63,7 @@ PLATFORMS
6363
arm64-darwin-21
6464
arm64-darwin-22
6565
arm64-darwin-23
66+
arm64-darwin-24
6667
x86_64-darwin-19
6768
x86_64-darwin-20
6869
x86_64-darwin-22
@@ -73,8 +74,8 @@ DEPENDENCIES
7374
rspec (~> 3.0)
7475
rubocop (~> 1.35)
7576
rubocop-rspec (~> 3.0)
76-
selenium-devtools (= 0.133.0)
77-
selenium-webdriver (= 4.29.1)
77+
selenium-devtools (= 0.134.0)
78+
selenium-webdriver (= 4.30.1)
7879

7980
BUNDLED WITH
8081
2.5.6

examples/ruby/spec/actions_api/keys_spec.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@
5656
expect(text_field.attribute('value')).to eq 'Selenium!'
5757
end
5858

59-
it 'copy and paste', except: {browser: :chrome,
60-
reason: 'https://bugs.chromium.org/p/chromedriver/issues/detail?id=4264'} do
59+
it 'copy and paste' do
6160
driver.get 'https://www.selenium.dev/selenium/web/single_text_input.html'
6261
wait.until { driver.find_element(id: 'textInput').attribute('autofocus') }
6362

Binary file not shown.

website_and_docs/content/documentation/webdriver/browsers/firefox.en.md

+2
Original file line numberDiff line numberDiff line change
@@ -451,3 +451,5 @@ please refer to the
451451
{{< badge-code >}}
452452
{{< /tab >}}
453453
{{< /tabpane >}}
454+
455+
**Note**: As of Firefox 138, geckodriver needs to be started with the argument `--allow-system-access` to switch the context to `CHROME`.

website_and_docs/content/documentation/webdriver/browsers/firefox.ja.md

+2
Original file line numberDiff line numberDiff line change
@@ -447,3 +447,5 @@ IDはアドオンインストール時の戻り値から取得できます。
447447
{{< badge-code >}}
448448
{{< /tab >}}
449449
{{< /tabpane >}}
450+
451+
**Note**: As of Firefox 138, geckodriver needs to be started with the argument `--allow-system-access` to switch the context to `CHROME`.

website_and_docs/content/documentation/webdriver/browsers/firefox.pt-br.md

+2
Original file line numberDiff line numberDiff line change
@@ -456,3 +456,5 @@ please refer to the
456456
{{< badge-code >}}
457457
{{< /tab >}}
458458
{{< /tabpane >}}
459+
460+
**Note**: As of Firefox 138, geckodriver needs to be started with the argument `--allow-system-access` to switch the context to `CHROME`.

website_and_docs/content/documentation/webdriver/browsers/firefox.zh-cn.md

+2
Original file line numberDiff line numberDiff line change
@@ -453,3 +453,5 @@ please refer to the
453453
{{< badge-code >}}
454454
{{< /tab >}}
455455
{{< /tabpane >}}
456+
457+
**Note**: As of Firefox 138, geckodriver needs to be started with the argument `--allow-system-access` to switch the context to `CHROME`.

website_and_docs/content/documentation/webdriver/getting_started/install_library.en.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Specify the dependency in the project `build.gradle` file as `testImplementation
3737
{{% /tab %}}
3838
{{% tab header="Python" %}}
3939
The minimum supported Python version for each Selenium version can be found
40-
in `Supported Python Versions` on [PyPi](https://pypi.org/project/selenium/)
40+
in "Supported Python Versions" on [PyPi](https://pypi.org/project/selenium/).
4141

4242
There are a couple different ways to install Selenium.
4343

@@ -50,11 +50,11 @@ pip install selenium
5050

5151
### Download
5252

53-
Alternatively you can download the [PyPI source archive](https://pypi.org/project/selenium/#files)
54-
(selenium-x.x.x.tar.gz) and install it using _setup.py_:
53+
Alternatively you can download the [PyPI Built Distribution](https://pypi.org/project/selenium/#files)
54+
(selenium-x.x.x.-py3-none-any.whl) and install it using _pip_:
5555

5656
```shell
57-
python setup.py install
57+
pip install selenium-x.x.x.-py3-none-any.whl
5858
```
5959
<br>
6060

website_and_docs/content/documentation/webdriver/getting_started/install_library.ja.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ pip install selenium
4848
### ダウンロード
4949

5050
または、ダウンロードすることもできます[PyPI ソースアーカイブ](https://pypi.org/project/selenium/#files)
51-
(selenium-x.x.x.tar.gz) を使用してインストールします _setup.py_
51+
(selenium-x.x.x.-py3-none-any.whl) を使用してインストールします _pip_:
5252

5353
```shell
54-
python setup.py install
54+
pip install selenium-x.x.x.-py3-none-any.whl
5555
```
5656
<br>
5757

0 commit comments

Comments
 (0)