What is a Window Handle in Selenium Webdriver

0 votes
Can anyone explain what is a Window Handle in Selenium Webdriver?
May 13, 2019 in Selenium by Fardeen
5,682 views

1 answer to this question.

0 votes

Hi Fardeen, 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. This window handle function helps in getting the handles of all the windows. It is guaranteed that each browser will have a unique window handle. Some of the windowhandle functions are: 

  • 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.  set<string> set= driver.get.windowhandles()
  • switch to: helps in switching between the windows
  • action: helps to perform certain actions on the windows.
answered May 13, 2019 by Sharath

Related Questions In Selenium

0 votes
2 answers

What is the best way to handle a Javascript popup using Selenium Webdriver?

webDriver.switchTo().alert() it inbuild selenium only //Store the alert ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
10,902 views
0 votes
1 answer

What is a Session Id in Selenium Webdriver?

Hey Uruj, in Selenium Webdriver Session ID ...READ MORE

answered Aug 21, 2019 in Selenium by Abha
• 28,140 points
5,102 views
+1 vote
2 answers

Is it possible to scroll down in a webpage using selenium webdriver programmed on python?

I using next code for facebook for ...READ MORE

answered May 16, 2019 in Selenium by mslavikas@gmail.com
26,073 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,673 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,142 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,221 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,874 views
0 votes
1 answer

What is a Modular Framework and why it is useful in Selenium webdriver?

Hi Junaid, as the name suggests, Modular ...READ MORE

answered May 13, 2019 in Selenium by Abha
• 28,140 points
13,258 views
0 votes
1 answer

What is POM in Selenium and what it is used for?

Hello Rubina, POM is Page Object Model which ...READ MORE

answered May 12, 2019 in Selenium by Anvi
• 14,150 points
1,769 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP