Automation Question:

Tell us what is the difference between getWindowHandles() and getWindowHandle()?

Tweet Share WhatsApp

Answer:

You can get the browser address using these commands. But if you use getWindowHandle(), you’ll get the address of the current browser where the control is and return type is a string. So, if you use getWindowHandles(), you will get the address of all the open browser and its return type is an iterator.

Download Automation PDF Read All 108 Automation Questions
Previous QuestionNext Question
Do you know how can we make one test method dependent on other using TestNG?Tell me what kind of mouse actions can be performed in Selenium?