robotframework / robotframework/SeleniumLibrary

Add functionality provided by new Selenium 4 create and/or switch to new window or tab

Open
#1,823 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.5k
Forks
787
PR merge metrics
No merged PRs in 30d

Description

As per the Selenium documentation [1], "Selenium 4 provides a new api NewWindow which creates a new tab (or) new window and automatically switches to it.". This is compared to the previous behavior where "[c]licking a link which opens in a new window [would] focus the new window or tab on screen, but WebDriver will not know which window the Operating System considers active. To work with the new window you will need to switch to it. If you have only two tabs or windows open, and you know which window you start with, by the process of elimination you can loop over both windows or tabs that WebDriver can see, and switch to the one which is not the original."

References:

  1. Working with windows and tabs
  2. Selenium WebDriver 4: New Window, New Tab & Screenshots - TestProject Blog post
  3. Selenium 4 - New Windows and Tab Utilities - SauceLabs Blog post

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Selenium 4 Working with windows and tabs documentation linked in the issue, then compare the NewWindow API with SeleniumLibrary's existing window and tab functionality. Done means SeleniumLibrary exposes equivalent create-and-switch behavior for a new window or tab and verifies it with appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.