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

What programming languages are you able to use in selenium rc?

559


How to capture screenshot in selenium webdriver?

579


What is fluent wait in selenium webdriver?

611


Name an api used for reading and writing data to excel files?

554


Explain the different kinds of frameworks in automation?

562






How do I launch the browser using webdriver?

574


What is a data driven framework?

616


How to find the xpath of web table elements.in chrome or internet explorer.or without using fire bug.?

1137


List the parameters that one needs to pass in selenium.

534


When should I use Selenium IDE?

615


My application uses ajax heavily how do I use selenium rc to work with ajax operations?

583


How to assert title of the web page?

609


What is junit annotations and what are different types of annotations which are useful?

587


Mention what is selenium 3.0?

553


What is the automation test?

617