Skip to content

Commit aac22ec

Browse files
authored
Merge branch 'trunk' into renovate/pytest-rerunfailures-15.x
2 parents 0d01e85 + 45fe003 commit aac22ec

File tree

24 files changed

+266
-479
lines changed

24 files changed

+266
-479
lines changed

Diff for: .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.7'
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

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

Diff for: 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

Diff for: 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
}

Diff for: 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

Diff for: examples/kotlin/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
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>

Diff for: 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
}

Diff for: 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

Diff for: 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

Diff for: 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 = [

Diff for: examples/python/tests/interactions/test_frames.py

+53
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
Binary file not shown.

Diff for: 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`.

Diff for: 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`.

Diff for: 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`.

Diff for: 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`.

Diff for: website_and_docs/content/documentation/webdriver/interactions/frames.en.md

+21-22
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,12 @@ find the frame using your preferred selector and switch to it.
7575
{{< tab header="Java" text=true >}}
7676
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L38-L46" >}}
7777
{{< /tab >}}
78-
{{< tab header="Python" >}}
79-
# Store iframe web element
80-
iframe = driver.find_element(By.CSS_SELECTOR, "#modal > iframe")
81-
82-
# switch to selected iframe
83-
driver.switch_to.frame(iframe)
84-
85-
# Now click on button
86-
driver.find_element(By.TAG_NAME, 'button').click()
87-
{{< /tab >}}
78+
79+
{{< tab header="Python" text=true >}}
80+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L24-L32" >}}
81+
{{< /tab >}}
82+
83+
8884
{{< tab header="CSharp" text=true >}}
8985
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L38-L46" >}}
9086
{{< /tab >}}
@@ -130,13 +126,11 @@ one found will be switched to.
130126
{{< tab header="Java" text=true >}}
131127
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L50-L58" >}}
132128
{{< /tab >}}
133-
{{< tab header="Python" >}}
134-
# Switch frame by id
135-
driver.switch_to.frame('buttonframe')
136-
137-
# Now, Click on the button
138-
driver.find_element(By.TAG_NAME, 'button').click()
139-
{{< /tab >}}
129+
130+
{{< tab header="Python" text=true >}}
131+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L34-L42" >}}
132+
{{< /tab >}}
133+
140134
{{< tab header="CSharp" text=true >}}
141135
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L50-L58" >}}
142136
{{< /tab >}}
@@ -180,7 +174,11 @@ queried using _window.frames_ in JavaScript.
180174
{{< tab header="Java" text=true >}}
181175
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L62-L63" >}}
182176
{{< /tab >}}
183-
177+
178+
{{< tab header="Python" text=true >}}
179+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L45-L46" >}}
180+
{{< /tab >}}
181+
184182
{{< tab header="Ruby" >}}
185183
# Switch to the second frame
186184
driver.switch_to.frame(1)
@@ -210,10 +208,11 @@ like so:
210208
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L66-L67" >}}
211209
{{< /tab >}}
212210

213-
{{< tab header="Python" >}}
214-
# switch back to default content
215-
driver.switch_to.default_content()
216-
{{< /tab >}}
211+
{{< tab header="Python" text=true >}}
212+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L49-L50" >}}
213+
{{< /tab >}}
214+
215+
217216
{{< tab header="CSharp" text=true >}}
218217
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L66-L67" >}}
219218
{{< /tab >}}

Diff for: website_and_docs/content/documentation/webdriver/interactions/frames.ja.md

+22-34
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,10 @@ WebElementを使用した切り替えは、最も柔軟なオプションです
6464
{{< tab header="Java" text=true >}}
6565
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L38-L46" >}}
6666
{{< /tab >}}
67-
{{< tab header="Python" >}}
68-
# Store iframe web element
69-
iframe = driver.find_element(By.CSS_SELECTOR, "#modal > iframe")
70-
71-
# switch to selected iframe
72-
driver.switch_to.frame(iframe)
73-
74-
# Now click on button
75-
driver.find_element(By.TAG_NAME, 'button').click()
76-
{{< /tab >}}
67+
{{< tab header="Python" text=true >}}
68+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L24-L32" >}}
69+
{{< /tab >}}
70+
7771
{{< tab header="CSharp" text=true >}}
7872
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L38-L46" >}}
7973
{{< /tab >}}
@@ -118,13 +112,11 @@ FrameまたはiFrameにidまたはname属性がある場合、代わりにこれ
118112
{{< tab header="Java" text=true >}}
119113
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L50-L58" >}}
120114
{{< /tab >}}
121-
{{< tab header="Python" >}}
122-
# Switch frame by id
123-
driver.switch_to.frame('buttonframe')
124-
125-
# Now, Click on the button
126-
driver.find_element(By.TAG_NAME, 'button').click()
127-
{{< /tab >}}
115+
116+
{{< tab header="Python" text=true >}}
117+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L34-L42" >}}
118+
{{< /tab >}}
119+
128120
{{< tab header="CSharp" text=true >}}
129121
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L50-L58" >}}
130122
{{< /tab >}}
@@ -155,31 +147,27 @@ driver.findElement(By.tagName("button")).click()
155147
JavaScriptの _window.frames_ を使用して照会できるように、Frameのインデックスを使用することもできます。
156148

157149
{{< tabpane langEqualsHeader=true >}}
158-
{{< tab header="Java" text=true >}}
150+
{{< tab header="Java" text=true >}}
159151
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/interactions/FramesTest.java#L62-L63" >}}
160-
{{< /tab >}}
161-
{{< tab header="Ruby" >}}
162-
# Switch to the second frame
152+
{{< /tab >}}
153+
{{< tab header="Python" text=true >}}
154+
{{< gh-codeblock path="examples/python/tests/interactions/test_frames.py#L45-L46" >}}
155+
{{< /tab >}}
156+
{{< tab header="Ruby" >}}
157+
# Switch to the second frame
163158
driver.switch_to.frame(1)
164-
{{< /tab >}}
165-
{{< tab header="CSharp" text=true >}}
159+
{{< /tab >}}
160+
{{< tab header="CSharp" text=true >}}
166161
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Interactions/FramesTest.cs#L62-L63" >}}
167162
{{< /tab >}}
168-
{{< tab header="Python" >}}
169-
# switching to second iframe based on index
170-
iframe = driver.find_elements(By.TAG_NAME,'iframe')[1]
171-
172-
# switch to selected iframe
173-
driver.switch_to.frame(iframe)
174-
{{< /tab >}}
175-
{{< tab header="JavaScript" >}}
163+
{{< tab header="JavaScript" >}}
176164
// Switches to the second frame
177165
await driver.switchTo().frame(1);
178-
{{< /tab >}}
179-
{{< tab header="Kotlin" >}}
166+
{{< /tab >}}
167+
{{< tab header="Kotlin" >}}
180168
// Switches to the second frame
181169
driver.switchTo().frame(1)
182-
{{< /tab >}}
170+
{{< /tab >}}
183171
{{< /tabpane >}}
184172

185173

0 commit comments

Comments
 (0)