Perform automated and live-interactive testing on 3000+ real desktop and mobile devices online.
In Selenium, you can create a new window by using the "window_handles" attribute, which returns the handles of all currently open windows. Then, using the “switch to.window()” method, you may go to the chosen window.
When you open a new browser window or tab, Selenium generates a new window handle for that window. The window handles attribute allows you to access and switch between these handles.
Here are different use cases of the window_handles attribute in Python:
Test your websites, web-apps, or mobile apps seamlessly with LambdaTest.
Start Free TestingEarn resume-worthy Selenium certifications that help you land a top job.
Learn MoreTest orchestration and execution cloud of 3000+ browsers and OS
24/7 support
Enterprise grade security
Fastest test execution cloud