How to handle multiple windows in Selenium?

How to handle multiple windows in Selenium ?

Hey Tom,

A window handle is a unique identifier that holds the address of all the windows. This is basically a pointer to a window, which returns the string value.

get.windowhandle(): helps in getting the window handle of the current window. get.windowhandles(): helps in getting the handles of all the windows opened.

set: helps to set the window handles which is in the form of a string.

switch to: helps in switching between the windows.

action: helps to perform certain actions on the windows.

1 Like