Skip to content

Commit 0e48a81

Browse files
authored
Merge branch 'trunk' into java-get_log
2 parents f13fd3a + 34cc4d9 commit 0e48a81

File tree

7 files changed

+235
-104
lines changed

7 files changed

+235
-104
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,39 @@
11
from selenium import webdriver
2+
from selenium.webdriver.common.by import By
23

4+
import pytest
5+
6+
7+
def test_interactions():
8+
# Initialize WebDriver
9+
driver = webdriver.Chrome()
10+
driver.implicitly_wait(0.5)
11+
12+
# Navigate to URL
13+
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
14+
15+
# Click on the checkbox
16+
check_input = driver.find_element(By.NAME, "checkbox_input")
17+
check_input.click()
18+
19+
is_checked = check_input.is_selected()
20+
assert is_checked == False
21+
22+
# Handle the email input field
23+
email_input = driver.find_element(By.NAME, "email_input")
24+
email_input.clear() # Clear field
25+
26+
27+
email_input.send_keys(email) # Enter text
28+
29+
# Verify input
30+
data = email_input.get_attribute("value")
31+
assert data == email
32+
33+
# Clear the email input field again
34+
email_input.clear()
35+
data = email_input.get_attribute("value")
36+
assert data == ""
37+
38+
# Quit the driver
39+
driver.quit()
Lines changed: 186 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,186 @@
1+
---
2+
title: "Selenium 4.27 Released!"
3+
linkTitle: "Selenium 4.27 Released!"
4+
date: 2024-11-27
5+
tags: ["selenium"]
6+
categories: ["releases"]
7+
author: Diego Molina [@diemol](https://www.diemol.com)
8+
images:
9+
- "/images/blog/2024/selenium_4.27.webp"
10+
description: >
11+
Today we're happy to announce that Selenium 4.27 has been released!
12+
---
13+
We're very happy to announce the release of Selenium 4.27 for
14+
Javascript, Ruby, Python, .NET, Java and the Grid!
15+
Links to everything can be found on our [downloads page][downloads].
16+
17+
Here is the latest iteration of the world’s most popular browser automation tool! This release
18+
brings significant updates across all supported languages, enhancing functionality, performance,
19+
and compatibility. From new features like FedCM command support in Python and improved BiDi
20+
handling in .NET to critical deprecations like CDP methods for Firefox.
21+
22+
## General Highlights
23+
24+
- **Chrome DevTools support** is now: v131, v128, and v127 (Firefox still uses v85 for all versions)
25+
- **Selenium has over** [5.1M active users](https://plausible.io/manager.selenium.dev) in the last 30 days. 300K more than 1 month ago!
26+
- **Deprecation of CDP methods for Firefox** across several bindings to align with evolving automation standards.
27+
- **Enhanced Selenium Grid** with improved session handling, distributed retry logic, and faster server shutdown processes.
28+
- **Updates for .NET and Java** to modernize exception handling, improve BiDi support, and address compatibility warnings.
29+
- **Deprecation of `getAttribute`** in multiple languages as part of Selenium's evolution.
30+
31+
32+
<br>
33+
34+
### Python
35+
- Deprecated CDP methods for Firefox. ([e2e9ac5f7e](https://github.com/SeleniumHQ/selenium/commit/e2e9ac5f7e5ca2a2326bea9d16425525ce43da57))
36+
- Replaced `imghdr` with `filetype` for better compatibility. ([b1828bf108](https://github.com/SeleniumHQ/selenium/commit/b1828bf1087d7d4acfd437d83ef6168617286191))
37+
- Moved project metadata from `setup.py` to `pyproject.toml`. ([673d2c78be](https://github.com/SeleniumHQ/selenium/commit/673d2c78be76f1ccbb2e1017e5240d52f428b400))
38+
- Added FedCM command support. ([d3d8070d50](https://github.com/SeleniumHQ/selenium/commit/d3d8070d50b481d2c6da98223322bc843cc25a01))
39+
- Introduced backward compatibility for `AppiumConnection`. ([3a3c46b3c1](https://github.com/SeleniumHQ/selenium/commit/3a3c46b3c144b0a350dea3598481edd2761f11c5))
40+
- Added user agent and extra headers via `ClientConfig`. ([e2023893c7](https://github.com/SeleniumHQ/selenium/commit/e2023893c7f37f69b2f7106a3907e0275bd9fbe1))
41+
- Addressed `DetachedShadowRoot` exception handling. ([7aabb8d1b4](https://github.com/SeleniumHQ/selenium/commit/7aabb8d1b48c1cae74ae97710009daea960dc9a3))
42+
43+
<br>
44+
45+
### Ruby
46+
- Deprecated CDP methods for Firefox. ([e9c09a200e](https://github.com/SeleniumHQ/selenium/commit/e9c09a200e374bba63acb0ef605175abb125e82e))
47+
- Resolved deprecation warnings for the `uri` gem. ([751bacb6bc](https://github.com/SeleniumHQ/selenium/commit/751bacb6bc934436ec9dec2416a022d8d577e30a))
48+
- Added BiDi navigation commands and support for network interception. ([573c8fe961](https://github.com/SeleniumHQ/selenium/commit/573c8fe9612c9c81406642e3e7a917cb5314eb3c))
49+
50+
51+
<br>
52+
53+
### Java
54+
- Enhanced error messages for `NoSuchElementException`. ([4a0d05e50e](https://github.com/SeleniumHQ/selenium/commit/4a0d05e50ea1750482211e04ece8062436eb5c6b))
55+
- Deprecated `WebElement.getAttribute()`. ([cd7303c437](https://github.com/SeleniumHQ/selenium/commit/cd7303c437b0702d3a17c9ef43594375c11016eb))
56+
- Introduced methods for selecting options containing specific text. ([b4b8aaba2b](https://github.com/SeleniumHQ/selenium/commit/b4b8aaba2bd3df57cae31164c614aec5f377c443))
57+
- Added Firefox CDP deprecation warnings. ([19fc217985](https://github.com/SeleniumHQ/selenium/commit/19fc2179855d0f70b7241a6c4cfbd9152e023609))
58+
59+
<br>
60+
61+
### .NET
62+
- Added CDP deprecation warnings for Firefox. ([8f725b3a80](https://github.com/SeleniumHQ/selenium/commit/8f725b3a80c3f3d621821e94a87db346ea91a8b1))
63+
- Improved BiDi and async support across modules. ([9054e892cc](https://github.com/SeleniumHQ/selenium/commit/9054e892ccabfb470243e2bad585f0474901dd31))
64+
- Enabled nullability annotations for better type safety. ([d9149acc09](https://github.com/SeleniumHQ/selenium/commit/d9149acc097531d336e611bd92d897381a0316c6))
65+
- Introduced compatibility improvements for actions with clashing device names. ([a9ec9ca682](https://github.com/SeleniumHQ/selenium/commit/a9ec9ca6821fd466e8e9d6e966d0feb150b0a5a4))
66+
- **Deprecated `GetAttribute` method** for WebElements. ([ac523a5d0a](https://github.com/SeleniumHQ/selenium/commit/ac523a5d0aa5a980a71c5adda3f4dafb0a560409))
67+
68+
69+
<br>
70+
71+
### JavaScript
72+
- Enabled BiDi tests for locating nodes with Chrome and Edge. ([339421538b](https://github.com/SeleniumHQ/selenium/commit/339421538b790c0ac2cf0a1a0aad62d0e76349eb))
73+
- Enhanced support for authentication handlers in BiDi commands. ([25551adfe8](https://github.com/SeleniumHQ/selenium/commit/25551adfe80f788453ec38fac7933c5369616d4f))
74+
- Updated dependencies to resolve security alerts. ([3906742748](https://github.com/SeleniumHQ/selenium/commit/3906742748d8b94b2eac074aeaf839eed20a95fa))
75+
76+
<br>
77+
78+
### Rust
79+
- Selenium Manager now honors full browser versions. ([fe5b1985e5](https://github.com/SeleniumHQ/selenium/commit/fe5b1985e570bae90bf757c23439d461ef0dda9c))
80+
- Updated logic to prioritize stable versions for Firefox management. ([0d2dda17b4](https://github.com/SeleniumHQ/selenium/commit/0d2dda17b4c4aba6ab0537f9d28910527c45a38b))
81+
82+
<br>
83+
84+
### Selenium Grid
85+
- Improved retry logic for session creation in distributed grids. ([e4ab299ea4](https://github.com/SeleniumHQ/selenium/commit/e4ab299ea4d16943c18e8c31e9db1f7738ed9493))
86+
- Improved session handling in Selenium Grid and reduced test flakiness. ([b0464e1adf](https://github.com/SeleniumHQ/selenium/commit/b0464e1adf8b4367dab9a98c26c800a7172cc0f8))
87+
- Enhanced server shutdown for faster termination. ([62aa0e551e](https://github.com/SeleniumHQ/selenium/commit/62aa0e551e79176f21e3e1658518bc40855f81ae))
88+
- Implemented graceful handling of stale sessions and client timeouts. ([b0464e1adf](https://github.com/SeleniumHQ/selenium/commit/b0464e1adf8b4367dab9a98c26c800a7172cc0f8))
89+
- Improved detection of unsupported HTTP methods during request handling. ([f56b3d07d9](https://github.com/SeleniumHQ/selenium/commit/f56b3d07d932f81bafc80b90d9b3cb059fba133e))
90+
91+
<br>
92+
93+
### Docker Selenium
94+
- K8s: Allow multiple nodes of the same type in Helm configuration ([#2475](https://github.com/SeleniumHQ/docker-selenium/pull/2475))
95+
- [See all changes](https://github.com/SeleniumHQ/docker-selenium/releases/tag/4.27.0-20241127)
96+
97+
<br>
98+
99+
## Contributors
100+
101+
**Special shout-out to everyone who helped the Selenium Team get this release out!**
102+
103+
### [Selenium](https://github.com/SeleniumHQ/selenium)
104+
105+
<div class="d-flex justify-content-center">
106+
<div class="col-11 p-4 bg-transparent">
107+
<div class="row justify-content-center">
108+
{{< gh-user "https://api.github.com/users/Delta456" >}}
109+
{{< gh-user "https://api.github.com/users/Earlopain" >}}
110+
{{< gh-user "https://api.github.com/users/RenderMichael" >}}
111+
{{< gh-user "https://api.github.com/users/andrew" >}}
112+
{{< gh-user "https://api.github.com/users/emanlove" >}}
113+
{{< gh-user "https://api.github.com/users/iampopovich" >}}
114+
{{< gh-user "https://api.github.com/users/josegomezr" >}}
115+
{{< gh-user "https://api.github.com/users/mk868" >}}
116+
{{< gh-user "https://api.github.com/users/navin772" >}}
117+
{{< gh-user "https://api.github.com/users/pnatashap" >}}
118+
{{< gh-user "https://api.github.com/users/sandeepsuryaprasad" >}}
119+
{{< gh-user "https://api.github.com/users/shbenzer" >}}
120+
{{< gh-user "https://api.github.com/users/syber911911" >}}
121+
</div>
122+
</div>
123+
</div>
124+
125+
126+
### [Selenium Docs & Website](https://github.com/SeleniumHQ/seleniumhq.github.io)
127+
128+
<div class="row justify-content-center">
129+
<div class="col-11 p-4 bg-transparent">
130+
<div class="row justify-content-center">
131+
{{< gh-user "https://api.github.com/users/AishIngale" >}}
132+
{{< gh-user "https://api.github.com/users/RenderMichael" >}}
133+
{{< gh-user "https://api.github.com/users/YevgeniyShunevych" >}}
134+
{{< gh-user "https://api.github.com/users/alaahong" >}}
135+
{{< gh-user "https://api.github.com/users/jasonren0403" >}}
136+
{{< gh-user "https://api.github.com/users/navin772" >}}
137+
{{< gh-user "https://api.github.com/users/pallavigitwork" >}}
138+
{{< gh-user "https://api.github.com/users/shbenzer" >}}
139+
{{< gh-user "https://api.github.com/users/zipperer" >}}
140+
</div>
141+
</div>
142+
</div>
143+
144+
### [Docker Selenium](https://github.com/SeleniumHQ/docker-selenium)
145+
146+
<div class="row justify-content-center">
147+
<div class="col-11 p-4 bg-transparent">
148+
<div class="row justify-content-center">
149+
{{< gh-user "https://api.github.com/users/VietND96" >}}
150+
</div>
151+
</div>
152+
</div>
153+
154+
### [Selenium Team Members][team]
155+
156+
**Thanks as well to all the team members who contributed to this release:**
157+
158+
<div class="row justify-content-center">
159+
<div class="col-11 p-4 bg-transparent">
160+
<div class="row justify-content-center">
161+
{{< gh-user "https://api.github.com/users/aguspe" >}}
162+
{{< gh-user "https://api.github.com/users/AutomatedTester" >}}
163+
{{< gh-user "https://api.github.com/users/bonigarcia" >}}
164+
{{< gh-user "https://api.github.com/users/diemol" >}}
165+
{{< gh-user "https://api.github.com/users/harsha509" >}}
166+
{{< gh-user "https://api.github.com/users/joerg1985" >}}
167+
{{< gh-user "https://api.github.com/users/nvborisenko" >}}
168+
{{< gh-user "https://api.github.com/users/p0deje" >}}
169+
{{< gh-user "https://api.github.com/users/pujagani" >}}
170+
{{< gh-user "https://api.github.com/users/shs96c" >}}
171+
{{< gh-user "https://api.github.com/users/titusfortner" >}}
172+
{{< gh-user "https://api.github.com/users/VietND96" >}}
173+
</div>
174+
</div>
175+
</div>
176+
177+
178+
179+
Stay tuned for updates by following SeleniumHQ on [X (Formerly Twitter)](https://twitter.com/seleniumhq) or [LinkedIn](https://www.linkedin.com/company/selenium/)!
180+
181+
Happy automating!
182+
183+
[downloads]: /downloads
184+
[bindings]: /downloads#bindings
185+
[team]: /project/structure
186+
[BiDi]: https://github.com/w3c/webdriver-bidi

website_and_docs/content/documentation/webdriver/elements/interactions.en.md

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,7 @@ Selenium will return an [element click intercepted](https://w3c.github.io/webdri
4949
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L18-L22" >}}
5050
{{< /tab >}}
5151
{{< tab header="Python" >}}
52-
53-
# Navigate to url
54-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
55-
56-
# Click on the element
57-
driver.find_element(By.NAME, "color_input").click()
52+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L12-L17" >}}
5853
{{< /tab >}}
5954

6055
{{< tab header="CSharp" text=true >}}
@@ -95,17 +90,7 @@ possible keystrokes that WebDriver Supports.
9590
{{< /tab >}}
9691

9792
{{< tab header="Python" >}}
98-
99-
100-
# Navigate to url
101-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
102-
103-
# Clear field to empty it from any previous data
104-
driver.find_element(By.NAME, "email_input").clear()
105-
106-
# Enter Text
107-
driver.find_element(By.NAME, "email_input").send_keys("[email protected]" )
108-
93+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L22-L27" >}}
10994
{{< /tab >}}
11095

11196
{{< tab header="CSharp" text=true >}}
@@ -147,15 +132,7 @@ with a`content-editable` attribute. If these conditions are not met,
147132
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L38-L40" >}}
148133
{{< /tab >}}
149134
{{< tab header="Python" >}}
150-
151-
152-
# Navigate to url
153-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
154-
155-
# Clear field to empty it from any previous data
156-
driver.find_element(By.NAME, "email_input").clear()
157-
158-
135+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L34" >}}
159136
{{< /tab >}}
160137

161138

website_and_docs/content/documentation/webdriver/elements/interactions.ja.md

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ Selenium will return an [element click intercepted](https://w3c.github.io/webdri
4545
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L18-L22" >}}
4646
{{< /tab >}}
4747
{{< tab header="Python" >}}
48-
49-
# Navigate to url
50-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
51-
52-
# Click on the element
53-
driver.find_element(By.NAME, "color_input").click()
48+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L12-L17" >}}
5449
{{< /tab >}}
5550

5651
{{< tab header="CSharp" text=true >}}
@@ -92,17 +87,7 @@ possible keystrokes that WebDriver Supports.
9287
{{< /tab >}}
9388

9489
{{< tab header="Python" >}}
95-
96-
97-
# Navigate to url
98-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
99-
100-
# Clear field to empty it from any previous data
101-
driver.find_element(By.NAME, "email_input").clear()
102-
103-
# Enter Text
104-
driver.find_element(By.NAME, "email_input").send_keys("[email protected]" )
105-
90+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L22-L27" >}}
10691
{{< /tab >}}
10792

10893
{{< tab header="CSharp" text=true >}}
@@ -143,15 +128,7 @@ with a`content-editable` attribute. If these conditions are not met,
143128
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L38-L40" >}}
144129
{{< /tab >}}
145130
{{< tab header="Python" >}}
146-
147-
148-
# Navigate to url
149-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
150-
151-
# Clear field to empty it from any previous data
152-
driver.find_element(By.NAME, "email_input").clear()
153-
154-
131+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L34" >}}
155132
{{< /tab >}}
156133

157134
{{< tab header="CSharp" text=true >}}

website_and_docs/content/documentation/webdriver/elements/interactions.pt-br.md

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,7 @@ Selenium will return an [element click intercepted](https://w3c.github.io/webdri
4646
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L18-L22" >}}
4747
{{< /tab >}}
4848
{{< tab header="Python" >}}
49-
50-
# Navigate to url
51-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
52-
53-
# Click on the element
54-
driver.find_element(By.NAME, "color_input").click()
49+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L12-L17" >}}
5550
{{< /tab >}}
5651

5752
{{< tab header="CSharp" text=true >}}
@@ -93,17 +88,7 @@ possible keystrokes that WebDriver Supports.
9388
{{< /tab >}}
9489

9590
{{< tab header="Python" >}}
96-
97-
98-
# Navigate to url
99-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
100-
101-
# Clear field to empty it from any previous data
102-
driver.find_element(By.NAME, "email_input").clear()
103-
104-
# Enter Text
105-
driver.find_element(By.NAME, "email_input").send_keys("[email protected]" )
106-
91+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L22-L27" >}}
10792
{{< /tab >}}
10893

10994
{{< tab header="CSharp" text=true >}}
@@ -144,15 +129,7 @@ with a`content-editable` attribute. If these conditions are not met,
144129
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InteractionTest.java#L38-L40" >}}
145130
{{< /tab >}}
146131
{{< tab header="Python" >}}
147-
148-
149-
# Navigate to url
150-
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
151-
152-
# Clear field to empty it from any previous data
153-
driver.find_element(By.NAME, "email_input").clear()
154-
155-
132+
{{< gh-codeblock path="examples/python/tests/elements/test_interaction.py#L34" >}}
156133
{{< /tab >}}
157134

158135
{{< tab header="CSharp" text=true >}}

0 commit comments

Comments
 (0)