How do you handle Multiple windows in your application?

Answer Posted / suresh777

Set<String> parent=driver.getWindowHandles();

Object[] child=parent.toArray();

driver.switchTo().window((String) child[1]);

Here we have handle at any number of Windows

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How much does selenium license cost per client machine?

483


What are the languages supported by webdriver?

503


How to verify if the checkbox/radio is checked or not?

453


What are the uses of findelement() and findelements()?

460


List some of the test types that are supported by selenium.

462






What are the different exceptions you have faced in selenium webdriver?

457


Why should Selenium be selected as a testing tool?

517


What are the important features of selenium ide?

510


How to get an attribute value using selenium webdriver?

556


What is Selenese?

590


Explain junit. What are annotations?

533


Explain what is the difference between find elements () and find element ()?

488


What is an explicit wait in selenium?

519


How will you use selenium to upload a file?

713


How does one store the current url using selenium 2.0?

489