Skip to content

Commit 2424948

Browse files
Merge branch 'trunk' into improve_docs
2 parents 8d94a30 + f8945d3 commit 2424948

16 files changed

Lines changed: 272 additions & 301 deletions

File tree

examples/python/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ trio==0.31.0
44
pytest-trio==0.8.0
55
pytest-rerunfailures==16.1
66
flake8==7.3.0
7-
requests==2.32.5
7+
requests==2.33.0
88
tox==4.32.0
99
pytest-xdist==3.8.0
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,58 @@
1+
import pytest
12
from selenium import webdriver
3+
from selenium.webdriver.support.ui import WebDriverWait
4+
from selenium.webdriver.common.by import By
5+
from selenium.webdriver.support import expected_conditions as EC
26

7+
url = "https://www.selenium.dev/selenium/web/window_switching_tests/page_with_frame.html"
8+
9+
@pytest.fixture()
10+
def driver():
11+
driver = webdriver.Chrome()
12+
yield driver
13+
driver.quit()
14+
15+
def test_current_window_handle(driver):
16+
driver.get(url)
17+
current_handle = driver.current_window_handle
18+
assert current_handle is not None
19+
20+
21+
def test_switch_to_window(driver):
22+
driver.get(url)
23+
wait = WebDriverWait(driver, 10)
24+
25+
original_window_handle = driver.current_window_handle
26+
27+
driver.find_element(By.LINK_TEXT, "Open new window").click()
28+
wait.until(EC.number_of_windows_to_be(2))
29+
30+
new_window_handle = (set(driver.window_handles) - {original_window_handle}).pop()
31+
driver.switch_to.window(new_window_handle)
32+
assert driver.current_window_handle == new_window_handle
33+
34+
def test_close_window(driver):
35+
driver.get(url)
36+
wait = WebDriverWait(driver, 10)
37+
38+
original_window_handle = driver.current_window_handle
39+
40+
driver.find_element(By.LINK_TEXT, "Open new window").click()
41+
wait.until(EC.number_of_windows_to_be(2))
42+
43+
new_window_handle = (set(driver.window_handles) - {original_window_handle}).pop()
44+
driver.switch_to.window(new_window_handle)
45+
46+
driver.close()
47+
driver.switch_to.window(original_window_handle)
48+
49+
assert driver.current_window_handle == original_window_handle
50+
assert len(driver.window_handles) == 1
51+
52+
def test_create_new_window(driver):
53+
# Opens a new tab and switches to new tab
54+
driver.switch_to.new_window('tab')
55+
assert driver.title == ""
56+
# Opens a new window and switches to new window
57+
driver.switch_to.new_window('window')
58+
assert driver.title == ""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
title: "Blog Posts - 2026"
33
linkTitle: "2026"
4-
weight: 86
4+
weight: 84
55
---
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: ".NET Assemblies Are Now Strongly Signed"
3+
linkTitle: ".NET Assemblies Are Now Strongly Signed"
4+
date: 2026-04-27
5+
tags: ["selenium", "dotnet"]
6+
categories: ["general"]
7+
author: Nikolay Borisenko [@nvborisenko](https://github.com/nvborisenko)
8+
description: >
9+
Starting with Selenium 4.44, the main NuGet packages ship strongly signed assemblies. The separate StrongNamed packages are retired.
10+
---
11+
12+
Starting with **Selenium 4.44**, the `Selenium.WebDriver` and `Selenium.Support` NuGet packages ship **strongly signed assemblies**. The separate `Selenium.WebDriver.StrongNamed` and `Selenium.Support.StrongNamed` packages are discontinued.
13+
14+
## Why This Matters
15+
16+
Without strong naming on the official packages, any project that itself needed to be strongly signed could not reference Selenium from NuGet. Teams were forced to either forgo strong naming, bundle out-of-band downloads, or use the separate `StrongNamed` packages with a different assembly name — all of which caused friction, especially in enterprise environments.
17+
18+
## What Changed
19+
20+
- `Selenium.WebDriver` and `Selenium.Support` are now strongly signed.
21+
Assembly names change: `WebDriver``Selenium.WebDriver`, `WebDriver.Support``Selenium.Support`.
22+
- `AssemblyVersion` stays at `4.0.0.0` (major-only) — no binding redirects needed between `4.x` releases.
23+
- `Selenium.WebDriver.StrongNamed` and `Selenium.Support.StrongNamed` are **retired**.
24+
25+
## Breaking Changes
26+
27+
If you reference the `StrongNamed` packages, migrate as follows:
28+
29+
1. Replace `Selenium.WebDriver.StrongNamed``Selenium.WebDriver`
30+
2. Replace `Selenium.Support.StrongNamed``Selenium.Support`
31+
3. Update assembly references: `WebDriver.StrongNamed``Selenium.WebDriver`, `WebDriver.Support.StrongNamed``Selenium.Support`
32+
33+
If you use the regular packages — the assemblies are now signed but the assembly names change (`WebDriver.dll``Selenium.WebDriver.dll`, `WebDriver.Support.dll``Selenium.Support.dll`), so update any explicit assembly references accordingly. The public API is unchanged.
34+
35+
## Related Issues
36+
37+
- [#12315](https://github.com/SeleniumHQ/selenium/issues/12315) — Publish StrongNamed builds to NuGet feed
38+
- [#10845](https://github.com/SeleniumHQ/selenium/issues/10845) — Revisiting strong-named assemblies for NuGet
39+
- [#14115](https://github.com/SeleniumHQ/selenium/issues/14115) — Strong Name Key
40+
41+
Implementation: [#17397](https://github.com/SeleniumHQ/selenium/pull/17397)

website_and_docs/content/documentation/test_practices/testing_types.en.md

Lines changed: 63 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ aliases: [
99
---
1010

1111
### Acceptance testing
12+
1213
This type of testing is done to determine if a feature or system
13-
meets the customer expectations and requirements.
14-
This type of testing generally involves the customer's
14+
meets the customer expectations and requirements.
15+
This type of testing generally involves the customer's
1516
cooperation or feedback, being a validation activity that
1617
answers the question:
1718
>Are we building the **_right_** product?
@@ -22,24 +23,25 @@ This simulation could be done by record/playback or through the
2223
different supported languages as explained in this documentation.
2324
Note: Acceptance testing is a subtype of **_functional testing_**,
2425
which some people might also refer to.
25-
26+
2627
### Functional testing
28+
2729
This type of testing is done to determine if a
2830
feature or system functions properly without issues. It checks
2931
the system at different levels to ensure that all scenarios
30-
are covered and that the system does _what_ it's
32+
are covered and that the system does _what_ it's
3133
supposed to do. It's a verification activity that
3234
answers the question:
3335
>Are we building the product **_right?_**
34-
35-
This generally includes: the tests work without errors
36-
(404, exceptions...), in a usable way (correct redirections),
37-
in an accessible way and matching its specifications
36+
37+
This generally includes: the tests work without errors
38+
(404, exceptions...), in a usable way (correct redirections),
39+
in an accessible way and matching its specifications
3840
(see **_acceptance testing_** above).
3941

4042
For web applications, the automation of this testing can be
41-
done directly with Selenium by simulating expected returns.
42-
This simulation could be done by record/playback or through
43+
done directly with Selenium by simulating expected returns.
44+
This simulation could be done by record/playback or through
4345
the different supported languages as explained in this documentation.
4446

4547
### Integration Tests
@@ -53,93 +55,100 @@ System Testing is a complete fully integrated product Testing. It is an end-to-e
5355
>For example, **_Testing the end to end flow from login to placing an order and rechecking the order in My Orders page and logoff from an ecommerce website._**
5456
5557
### Performance testing
56-
As its name indicates, performance tests are done
58+
59+
As its name indicates, performance tests are done
5760
to measure how well an application is performing.
5861

5962
There are two main sub-types for performance testing:
6063

6164
#### Load testing
62-
Load testing is done to verify how well the
63-
application works under different defined loads
65+
66+
Load testing is done to verify how well the
67+
application works under different defined loads
6468
(usually a particular number of users connected at once).
6569

6670
>For example, **_Testing that the site can handle numerous orders/users at once._**
6771
6872
#### Stress testing
73+
6974
Stress testing is done to verify how well the
7075
application works under stress (or above the maximum supported load).
7176

7277
>For example, **_Testing that your ecommerce site can handle Black Friday_**
7378
74-
Generally, performance tests are done by executing some
75-
Selenium written tests simulating different users
76-
hitting a particular function on the web app and
77-
retrieving some meaningful measurements.
79+
Generally, performance tests are done by executing some
80+
Selenium written tests simulating different users
81+
hitting a particular function on the web app and
82+
retrieving some meaningful measurements.
7883

7984
This is generally done by other tools that retrieve the metrics.
8085
One such tool is **_JMeter_**.
8186

82-
For a web application, details to measure include
87+
For a web application, details to measure include
8388
throughput, latency, data loss, individual component loading times, etc.
8489

8590
Note 1: All browsers have a performance tab in their
8691
developers' tools section (accessible by pressing F12)
8792

8893
Note 2: is a subtype of **_non-functional testing_**
8994
as this is generally measured per system and not per function/feature.
90-
95+
9196
### Regression testing
92-
This testing is generally done after a change, fix or feature addition.
9397

94-
To ensure that the change has not broken any of the existing
95-
functionality, some already executed tests are executed again.
98+
This testing is generally done after a change, fix or feature addition.
99+
100+
To ensure that the change has not broken any of the existing
101+
functionality, some already executed tests are executed again.
96102

97103
>For example, **_Testing that your new search bar doesn't break the other buttons on the menu_**
98-
104+
99105
The set of re-executed tests can be full or partial
100106
and can include several different types, depending
101107
on the application and development team.
102-
108+
103109
### Test driven development (TDD)
110+
104111
Rather than a test type _per se_, TDD is an iterative
105112
development methodology in which tests drive the design of a feature.
106113

107114
Each cycle starts by creating a set of unit tests that
108115
the feature should eventually pass (they should fail their first time executed).
109116

110-
After this, development takes place to make the tests pass.
111-
The tests are executed again, starting another cycle
117+
After this, development takes place to make the tests pass.
118+
The tests are executed again, starting another cycle
112119
and this process continues until all tests are passing.
113120

114121
This aims to speed up the development of an application
115122
based on the fact that defects are less costly the earlier they are found.
116123

117124
### Behavior-driven development (BDD)
118-
BDD is also an iterative development methodology
119-
based on the above TDD, in which the goal is to involve
120-
all the parties in the development of an application.
121-
122-
Each cycle starts by creating some specifications
123-
(which should fail). Then create the failing unit
124-
tests (which should also fail) and then do the development.
125-
126-
This cycle is repeated until all types of tests are passing.
127-
128-
In order to do so, a specification language is
129-
used. It should be understandable by all parties and
130-
simple, standard and explicit.
131-
Most tools use **_Gherkin_** as this language.
132-
133-
The goal is to be able to detect even more errors
134-
than TDD, by targeting potential acceptance errors
135-
too and make communication between parties smoother.
136-
137-
A set of tools are currently available
138-
to write the specifications and match them with code functions,
139-
such as **_Cucumber_** or **_SpecFlow._**
140-
141-
A set of tools are built on top of Selenium to make this process
142-
even faster by directly transforming the BDD specifications into
143-
executable code.
144-
Some of these are **_JBehave, Capybara and Robot Framework_**.
145-
125+
126+
Behavior-Driven Development (BDD) is an iterative methodology inspired by
127+
TDD that focuses on defining system behavior through shared examples.
128+
It emphasizes collaboration between business stakeholders, developers,
129+
and testers to ensure a common understanding of requirements.
130+
131+
Development begins by defining specifications in a ubiquitous language,
132+
commonly expressed using **_Gherkin_**. These specifications describe
133+
expected behavior and serve as acceptance criteria.
134+
Scenarios may initially fail when automated, guiding development until
135+
the behavior is implemented.
136+
137+
BDD scenarios are supported by underlying code and tests, which may include:
138+
unit, integration, or UI-level automation.
139+
Tools such as Cucumber and SpecFlow enable mapping specifications
140+
to executable code, often integrating with automation tools like Selenium.
141+
142+
The primary goal of BDD is to prevent misunderstandings and acceptance-level
143+
defects by ensuring the right software is built from the start.
144+
In common practice, Selenium is integrated with BDD frameworks
145+
to automate browser-based behaviors described in BDD scenarios. In this setup:
146+
147+
BDD frameworks such as: **_Cucumber, JBehave, Capybara and Robot Framework_**
148+
are responsible for parsing and managing specifications
149+
**_Step definitions_** act as the bridge between human-readable scenarios
150+
and executable code
151+
152+
Selenium as the automation engine to perform browser interactions
153+
can be used in combination with the frameworks mentioned above as
154+
an optional dependency that enables UI automation when browser-level validation is required.

website_and_docs/content/documentation/test_practices/testing_types.md

Whitespace-only changes.

0 commit comments

Comments
 (0)