Skip to content

Commit 4b6f3b2

Browse files
authored
Merge branch 'trunk' into document_selenium_bindings
2 parents 77b6b17 + 570e74a commit 4b6f3b2

File tree

13 files changed

+583
-703
lines changed

13 files changed

+583
-703
lines changed
Lines changed: 98 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,109 @@
1-
package dev.selenium.interactions;
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+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
217

3-
import dev.selenium.BaseChromeTest;
4-
import org.junit.jupiter.api.Assertions;
518
import org.junit.jupiter.api.Test;
19+
import org.junit.jupiter.api.Assertions;
620
import org.openqa.selenium.Cookie;
21+
import org.openqa.selenium.WebDriver;
22+
import org.openqa.selenium.chrome.ChromeDriver;
723
import java.util.Set;
824

9-
public class CookiesTest extends BaseChromeTest {
10-
@Test
11-
public void addCookie() {
12-
try {
13-
driver.get("https://www.selenium.dev/selenium/web/blank.html");
14-
// Add cookie into current browser context
15-
driver.manage().addCookie(new Cookie("key", "value"));
16-
} finally {
17-
driver.quit();
18-
}
19-
}
20-
@Test
21-
public void getNamedCookie() {
22-
try {
23-
driver.get("https://www.selenium.dev/selenium/web/blank.html");
24-
// Add cookie into current browser context
25-
driver.manage().addCookie(new Cookie("foo", "bar"));
26-
// Get cookie details with named cookie 'foo'
27-
Cookie cookie = driver.manage().getCookieNamed("foo");
28-
Assertions.assertEquals(cookie.getValue(), "bar");
29-
} finally {
30-
driver.quit();
31-
}
32-
}
25+
public class CookiesTest {
26+
27+
WebDriver driver = new ChromeDriver();
28+
@Test
29+
public void addCookie() {
30+
driver.get("https://www.selenium.dev/selenium/web/blank.html");
31+
// Add cookie into current browser context
32+
driver.manage().addCookie(new Cookie("key", "value"));
33+
driver.quit();
34+
}
35+
@Test
36+
public void getNamedCookie() {
37+
38+
driver.get("https://www.selenium.dev/selenium/web/blank.html");
39+
// Add cookie into current browser context
40+
driver.manage().addCookie(new Cookie("foo", "bar"));
41+
// Get cookie details with named cookie 'foo'
42+
Cookie cookie = driver.manage().getCookieNamed("foo");
43+
Assertions.assertEquals(cookie.getValue(), "bar");
44+
45+
driver.quit();
46+
}
47+
3348

34-
@Test
35-
public void getAllCookies() {
36-
try {
37-
driver.get("https://www.selenium.dev/selenium/web/blank.html");
38-
// Add cookies into current browser context
39-
driver.manage().addCookie(new Cookie("test1", "cookie1"));
40-
driver.manage().addCookie(new Cookie("test2", "cookie2"));
41-
// Get cookies
42-
Set<Cookie> cookies = driver.manage().getCookies();
43-
for (Cookie cookie : cookies) {
44-
if (cookie.getName().equals("test1")) {
45-
Assertions.assertEquals(cookie.getValue(), "cookie1");
46-
}
49+
@Test
50+
public void getAllCookies() {
51+
52+
driver.get("https://www.selenium.dev/selenium/web/blank.html");
53+
// Add cookies into current browser context
54+
driver.manage().addCookie(new Cookie("test1", "cookie1"));
55+
driver.manage().addCookie(new Cookie("test2", "cookie2"));
56+
// Get cookies
57+
Set<Cookie> cookies = driver.manage().getCookies();
58+
for (Cookie cookie : cookies) {
59+
if (cookie.getName().equals("test1")) {
60+
Assertions.assertEquals(cookie.getValue(), "cookie1");
61+
}
4762

48-
if (cookie.getName().equals("test2")) {
49-
Assertions.assertEquals(cookie.getValue(), "cookie2");
50-
}
51-
}
52-
} finally {
53-
driver.quit();
54-
}
55-
}
63+
if (cookie.getName().equals("test2")) {
64+
Assertions.assertEquals(cookie.getValue(), "cookie2");
65+
}
66+
}
67+
driver.quit();
68+
}
69+
5670

57-
@Test
58-
public void deleteCookieNamed() {
59-
try {
60-
driver.get("https://www.selenium.dev/selenium/web/blank.html");
61-
driver.manage().addCookie(new Cookie("test1", "cookie1"));
62-
// delete cookie named
63-
driver.manage().deleteCookieNamed("test1");
64-
} finally {
65-
driver.quit();
66-
}
67-
}
71+
@Test
72+
public void deleteCookieNamed() {
73+
74+
driver.get("https://www.selenium.dev/selenium/web/blank.html");
75+
driver.manage().addCookie(new Cookie("test1", "cookie1"));
76+
// delete cookie named
77+
driver.manage().deleteCookieNamed("test1");
78+
driver.quit();
79+
}
6880

69-
@Test
70-
public void deleteCookieObject() {
71-
try {
72-
driver.get("https://www.selenium.dev/selenium/web/blank.html");
73-
Cookie cookie = new Cookie("test2", "cookie2");
74-
driver.manage().addCookie(cookie);
75-
/*
76-
Selenium Java bindings also provides a way to delete
77-
cookie by passing cookie object of current browsing context
78-
*/
79-
driver.manage().deleteCookie(cookie);
80-
} finally {
81-
driver.quit();
82-
}
83-
}
81+
@Test
82+
public void deleteCookieObject() {
83+
84+
driver.get("https://www.selenium.dev/selenium/web/blank.html");
85+
Cookie cookie = new Cookie("test2", "cookie2");
86+
driver.manage().addCookie(cookie);
87+
/*
88+
Selenium Java bindings also provides a way to delete
89+
cookie by passing cookie object of current browsing context
90+
*/
91+
driver.manage().deleteCookie(cookie);
92+
93+
driver.quit();
94+
}
95+
8496

85-
@Test
86-
public void deleteAllCookies() {
87-
try {
88-
driver.get("https://www.selenium.dev/selenium/web/blank.html");
89-
// Add cookies into current browser context
90-
driver.manage().addCookie(new Cookie("test1", "cookie1"));
91-
driver.manage().addCookie(new Cookie("test2", "cookie2"));
92-
// Delete All cookies
93-
driver.manage().deleteAllCookies();
94-
} finally {
95-
driver.quit();
96-
}
97-
}
97+
@Test
98+
public void deleteAllCookies() {
99+
100+
driver.get("https://www.selenium.dev/selenium/web/blank.html");
101+
// Add cookies into current browser context
102+
driver.manage().addCookie(new Cookie("test1", "cookie1"));
103+
driver.manage().addCookie(new Cookie("test2", "cookie2"));
104+
// Delete All cookies
105+
driver.manage().deleteAllCookies();
106+
107+
driver.quit();
108+
}
98109
}
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
---
2+
title: "Selenium 4.26 Released!"
3+
linkTitle: "Selenium 4.26 Released!"
4+
date: 2024-11-03
5+
tags: ["selenium"]
6+
categories: ["releases"]
7+
author: Diego Molina [@diemol](https://www.diemol.com)
8+
images:
9+
- "/images/blog/2024/selenium_4.26.jpg"
10+
description: >
11+
Today we're happy to announce that Selenium 4.26 has been released!
12+
---
13+
14+
We're very happy to announce the release of Selenium 4.26 for
15+
Javascript, Ruby, Python, .NET, Java and the Grid!
16+
Links to everything can be found on our [downloads page][downloads].
17+
18+
Selenium 4.26.0 release introduces new features, key enhancements, and numerous bug fixes across
19+
different languages and components. This version focuses on improving compatibility, updating
20+
dependencies, enhancing internal logging, and providing broader WebDriver capabilities. Here are
21+
the most important updates:
22+
23+
## General Highlights
24+
- **Chrome DevTools support** is now: v130, v129, and v128 (Firefox still uses v85 for all versions)
25+
- **Selenium has at least** [4.8M active users](https://plausible.io/manager.selenium.dev) in the last 30 days. 800K more than 1 month ago!
26+
- **Selenium Manager Enhancements**: Added better handling for invalid browser versions and improved logging, helping to streamline browser management.
27+
- **Expanded BiDi (Bidirectional WebDriver Protocol) Support for .NET**: Continuing the work on BiDi for .NET, this release includes improved WebSocket communication, CDP DevTools integration, and expanded logging, advancing real-time and bidirectional interactions.
28+
- **Grid UI Enhancements**: New sorting options by Platform, Status, and ID, session timeout display, and WebSocket connection management for better performance and user experience.
29+
- **CI/CD Pipeline Improvements**: Numerous updates for CI workflows, such as artifact handling and new testing configurations, to boost stability and developer productivity.
30+
31+
<br>
32+
33+
### .NET
34+
- Updated WebSocket communication and DevTools integration in the BiDi implementation, adding extensive internal logs to improve diagnostics ([#14566](https://github.com/SeleniumHQ/selenium/pull/14566), [#14558](https://github.com/SeleniumHQ/selenium/pull/14558)).
35+
- Added support for the `GetLog` command in the Remote WebDriver ([#14549](https://github.com/SeleniumHQ/selenium/pull/14549)).
36+
- Enhanced configuration for `PrintOptions`, allowing direct control over `PageDimensions` and `PageMargins` ([#14593](https://github.com/SeleniumHQ/selenium/pull/14593)).
37+
- Deprecated several old constructors for cleaner exception handling and improved compatibility with Ahead-of-Time (AOT) compilation ([#14574](https://github.com/SeleniumHQ/selenium/pull/14574)).
38+
39+
<br>
40+
41+
### Java
42+
- Increased property scope for improved compatibility with Appium ([#14183](https://github.com/SeleniumHQ/selenium/pull/14183)).
43+
- Updated SpotBugs settings and fixed issues in `ChromiumDriver` and `PortProber` for cleaner code ([#14589](https://github.com/SeleniumHQ/selenium/pull/14589)).
44+
- Added PAC proxy URL support for Selenium Manager to expand proxy configuration capabilities ([#14506](https://github.com/SeleniumHQ/selenium/pull/14506)).
45+
46+
<br>
47+
48+
### Python
49+
- Added more internal logging for CDP, and configured WebDriver HTTP client settings for enhanced performance ([#14668](https://github.com/SeleniumHQ/selenium/pull/14668), [#13286](https://github.com/SeleniumHQ/selenium/pull/13286)).
50+
> Explore the various configuration parameters for the [WebDriver HTTP client](https://www.selenium.dev/documentation/webdriver/drivers/http_client/).
51+
- Removed deprecated EdgeService parameters and eliminated Python 2.x code from various test files ([#14563](https://github.com/SeleniumHQ/selenium/pull/14563), [#14502](https://github.com/SeleniumHQ/selenium/pull/14502)).
52+
- Set consistent polling for `WebDriverWait` methods to align behavior between Java and Python implementations ([#14626](https://github.com/SeleniumHQ/selenium/pull/14626)).
53+
- Improves binding extensibility for seamless integration of Selenium into Appium's Python client. ([#14587](https://github.com/SeleniumHQ/selenium/pull/14587)).
54+
55+
<br>
56+
57+
### JavaScript
58+
- Closed BiDi WebSocket connection on session end, improving session management in BiDi ([#14507](https://github.com/SeleniumHQ/selenium/pull/14507)).
59+
- Fixed issues with `sendKeys` command, addressing errors in `FileDetector` handling ([#14663](https://github.com/SeleniumHQ/selenium/pull/14663)).
60+
61+
<br>
62+
63+
### Ruby
64+
- Added RBS type support for BiDi-related classes, aligning with updates for Ruby BiDi compatibility ([#14611](https://github.com/SeleniumHQ/selenium/pull/14611)).
65+
- Updated BiDi script structures to match recent specifications for consistent implementation ([#14236](https://github.com/SeleniumHQ/selenium/pull/14236)).
66+
67+
<br>
68+
69+
### Selenium Grid
70+
- New Grid UI features for sorting and WebSocket management, adding clarity and control to session management ([#14571](https://github.com/SeleniumHQ/selenium/pull/14571), [#14598](https://github.com/SeleniumHQ/selenium/pull/14598), [#14599](https://github.com/SeleniumHQ/selenium/pull/14599)).
71+
- Enabled async requests in `httpclient` to enhance request handling performance ([#14409](https://github.com/SeleniumHQ/selenium/pull/14409)).
72+
- Improved node handling for better scalability and stability ([#14628](https://github.com/SeleniumHQ/selenium/pull/14628)).
73+
74+
<br>
75+
76+
### Docker Selenium
77+
- Updated FFmpeg v7.1 in video recorder ([#2439](https://github.com/SeleniumHQ/docker-selenium/pull/2439)).
78+
- Updated in Helm chart for Selenium Grid deployment to Kubernetes
79+
- Add GraphQL metrics exporter for monitoring ([#2425](https://github.com/SeleniumHQ/docker-selenium/pull/2425)).
80+
- Add templates for Relay node ([#2453](https://github.com/SeleniumHQ/docker-selenium/pull/2453)).
81+
- Allow to overwrite config videoRecorder in each node ([#2445](https://github.com/SeleniumHQ/docker-selenium/pull/2445)).
82+
83+
<br>
84+
85+
## Contributors
86+
87+
**Special shout-out to everyone who helped the Selenium Team get this release out!**
88+
89+
### [Selenium](https://github.com/SeleniumHQ/selenium)
90+
91+
<div class="d-flex justify-content-center">
92+
<div class="col-11 p-4 bg-transparent">
93+
<div class="row justify-content-center">
94+
{{< gh-user "https://api.github.com/users/BlitzDestroyer" >}}
95+
{{< gh-user "https://api.github.com/users/Delta456" >}}
96+
{{< gh-user "https://api.github.com/users/Mr0grog" >}}
97+
{{< gh-user "https://api.github.com/users/RenderMichael" >}}
98+
{{< gh-user "https://api.github.com/users/aguspe" >}}
99+
{{< gh-user "https://api.github.com/users/dbernhard-0x7CD" >}}
100+
{{< gh-user "https://api.github.com/users/garg3133" >}}
101+
{{< gh-user "https://api.github.com/users/iampopovich" >}}
102+
{{< gh-user "https://api.github.com/users/mk868" >}}
103+
{{< gh-user "https://api.github.com/users/navin772" >}}
104+
{{< gh-user "https://api.github.com/users/shbenzer" >}}
105+
</div>
106+
</div>
107+
</div>
108+
109+
110+
### [Selenium Docs & Website](https://github.com/SeleniumHQ/seleniumhq.github.io)
111+
112+
<div class="row justify-content-center">
113+
<div class="col-11 p-4 bg-transparent">
114+
<div class="row justify-content-center">
115+
{{< gh-user "https://api.github.com/users/Abdelrhman-Ellithy" >}}
116+
{{< gh-user "https://api.github.com/users/AishIngale" >}}
117+
{{< gh-user "https://api.github.com/users/Delta456" >}}
118+
{{< gh-user "https://api.github.com/users/alaahong" >}}
119+
{{< gh-user "https://api.github.com/users/harshitBhardwaj97" >}}
120+
{{< gh-user "https://api.github.com/users/pallavigitwork" >}}
121+
{{< gh-user "https://api.github.com/users/shbenzer" >}}
122+
{{< gh-user "https://api.github.com/users/zipperer" >}}
123+
</div>
124+
</div>
125+
</div>
126+
127+
### [Docker Selenium](https://github.com/SeleniumHQ/docker-selenium)
128+
129+
<div class="row justify-content-center">
130+
<div class="col-11 p-4 bg-transparent">
131+
<div class="row justify-content-center">
132+
{{< gh-user "https://api.github.com/users/brunobritorj" >}}
133+
</div>
134+
</div>
135+
</div>
136+
137+
### [Selenium Team Members][team]
138+
139+
**Thanks as well to all the team members who contributed to this release:**
140+
141+
<div class="row justify-content-center">
142+
<div class="col-11 p-4 bg-transparent">
143+
<div class="row justify-content-center">
144+
{{< gh-user "https://api.github.com/users/AutomatedTester" >}}
145+
{{< gh-user "https://api.github.com/users/bonigarcia" >}}
146+
{{< gh-user "https://api.github.com/users/diemol" >}}
147+
{{< gh-user "https://api.github.com/users/harsha509" >}}
148+
{{< gh-user "https://api.github.com/users/joerg1985" >}}
149+
{{< gh-user "https://api.github.com/users/nvborisenko" >}}
150+
{{< gh-user "https://api.github.com/users/p0deje" >}}
151+
{{< gh-user "https://api.github.com/users/pujagani" >}}
152+
{{< gh-user "https://api.github.com/users/shs96c" >}}
153+
{{< gh-user "https://api.github.com/users/titusfortner" >}}
154+
{{< gh-user "https://api.github.com/users/VietND96" >}}
155+
</div>
156+
</div>
157+
</div>
158+
159+
## Project Highlights
160+
161+
This year marks a monumental milestone—20 years of Selenium transforming browser automation!
162+
Since its inception as a modest open-source project, Selenium has grown into the world’s most
163+
trusted tool for web automation, powering testing and development for countless users globally.
164+
From revolutionizing open-source collaboration to shaping automation practices, Selenium has
165+
impacted developers, testers, and organizations worldwide.
166+
167+
To honor this journey, the Selenium team hosted a special webinar on October 28th, 2024, where
168+
the leadership team shared insights on Selenium’s evolution, the latest advancements in WebDriver
169+
BiDi, and exciting prospects for the future. If you’d like to learn more about Selenium’s
170+
incredible journey and future plans, head to the official blog post
171+
[here](https://www.selenium.dev/blog/2024/selenium-milestone-20yrs-blog/).
172+
173+
Special thanks to the Selenium community for your continued support and contributions, to
174+
the entire Selenium team for their dedication and hard work,
175+
and to [Pallavi Sharma](https://www.linkedin.com/in/pallavimuse/) and
176+
[Maaret Pyhäjärvi](https://www.linkedin.com/in/maaret/) for organizing and leading this event.
177+
178+
179+
180+
Stay tuned for updates by following SeleniumHQ on [X (Formerly Twitter)](https://twitter.com/seleniumhq) or [LinkedIn](https://www.linkedin.com/company/selenium/)!
181+
182+
Happy automating!
183+
184+
[downloads]: /downloads
185+
[bindings]: /downloads#bindings
186+
[team]: /project/structure
187+
[BiDi]: https://github.com/w3c/webdriver-bidi

0 commit comments

Comments
 (0)