multiple windows handling in selenium webdriver
Quality,  Selenium,  Software Testing,  Webdriver

Multiple Windows Handling in Selenium Webdriver

Multiple Windows Handling in Selenium Webdriver

There are many web applications which have pop up windows or child windows or multiple windows. So while Testing if we use Manual Testing then we can do the testing by operating all the windows separately. But if we want to automate this kind of scenario then we need to do multiple windows handling in selenium webdriver.

Suppose there is a scenario where we have to manage multiple windows and need to navigate in all the windows for example: Open spicejet.com >> fill mandatory fields >> click on Find flights button >> now click on Currency Converter link which is available on the page >> then enter the values in the pop up >> close the pop up and select any value which is going to be fit.

• To handle the pop up or child window, we need to navigate from the main window to the pop up window by using the below command, we need to enter the child window or pop up window name in place of “window name”:

Syntax: driver.switchto().window(“window name”);

• To navigate back from pop up to main window again, we have to use the same command we need to enter the main window name in place of “window name”:

Syntax: driver.switchto().window(“window name”);

Get Window Handle

This type of command is to take the window name from any child window or pop window or main window where the webdriver is having the focus.
The written type of get window handle is string.
Syntax: string str = driver.getwindowhandle();
              driver.switchto().window( str );

Note:
To handle the frame, we need to navigate from the main window to the frame where we need to pass the frame id or frame name.
Syntax: driver.switchto().frame(“frame id / frame name”);

 

Click here to Read How to Handle JavaScript Alert Messages in Selenium Webdriver 

Click here to Read How to create Automation Script in Selenium Webdriver 

25 Comments

  • adidas nmd

    I and also my pals have already been taking note of the good guides from your web page then the sudden got an awful suspicion I never expressed respect to the site owner for those secrets. My ladies had been as a result passionate to learn them and have undoubtedly been loving those things. Appreciate your being simply accommodating and for selecting this kind of terrific useful guides millions of individuals are really desperate to be informed on. My very own honest apologies for not expressing gratitude to sooner.

  • hermes handbags

    I wanted to create you one bit of observation to finally give many thanks the moment again for those stunning basics you’ve provided above. This has been so surprisingly open-handed with you to deliver without restraint exactly what a lot of folks could have marketed as an e book to end up making some profit on their own, specifically since you might well have tried it if you ever desired. The advice likewise worked to be the fantastic way to fully grasp other people online have a similar dreams the same as mine to find out a lot more concerning this condition. I know there are a lot more fun moments up front for people who look into your site.

  • balenciaga sneakers

    I and my pals ended up looking at the great thoughts from your web site then the sudden got a horrible feeling I had not expressed respect to the blog owner for those tips. These ladies appeared to be absolutely excited to see them and already have without a doubt been tapping into them. Appreciation for getting so thoughtful and also for deciding on variety of magnificent topics most people are really needing to know about. Our sincere regret for not expressing gratitude to you earlier.

  • jordan shoes

    I simply wanted to compose a quick remark in order to express gratitude to you for the lovely tricks you are posting at this site. My prolonged internet research has at the end been honored with incredibly good content to write about with my close friends. I ‘d admit that many of us site visitors actually are quite endowed to live in a fabulous network with many marvellous people with very beneficial tactics. I feel rather fortunate to have used your webpage and look forward to tons of more pleasurable minutes reading here. Thank you once more for all the details.

  • nike shox

    I wanted to develop a brief comment to be able to express gratitude to you for all the nice guidelines you are writing at this website. My incredibly long internet look up has now been compensated with incredibly good knowledge to exchange with my two friends. I ‘d claim that most of us website visitors are definitely lucky to live in a really good site with many brilliant people with beneficial methods. I feel somewhat blessed to have seen your site and look forward to so many more amazing times reading here. Thank you again for everything.

  • giannis shoes

    Thank you for your whole labor on this site. Kim really loves getting into investigation and it is easy to understand why. Many of us know all of the compelling tactic you offer functional tactics through your website and in addition strongly encourage contribution from website visitors on this area of interest while my simple princess is without question studying a lot of things. Enjoy the rest of the new year. You are doing a dazzling job.

  • moncler jacket

    I simply wanted to compose a quick word so as to say thanks to you for all the awesome instructions you are giving out at this website. My time consuming internet investigation has now been honored with extremely good strategies to share with my classmates and friends. I ‘d state that that we readers actually are extremely fortunate to live in a good place with so many wonderful professionals with interesting principles. I feel very lucky to have come across the webpage and look forward to plenty of more exciting moments reading here. Thanks again for all the details.

  • lebron 17

    I simply wanted to type a simple note to say thanks to you for all the remarkable suggestions you are posting on this site. My time intensive internet research has finally been paid with reasonable content to share with my great friends. I ‘d tell you that most of us visitors are undoubtedly blessed to dwell in a wonderful site with many outstanding professionals with valuable tips and hints. I feel really fortunate to have seen your webpage and look forward to really more exciting times reading here. Thanks a lot once again for a lot of things.

  • lebron 16

    I am commenting to make you know of the fine encounter my daughter obtained visiting your blog. She realized numerous things, which include what it’s like to possess an awesome helping character to have the mediocre ones just learn about a number of problematic topics. You really exceeded visitors’ expected results. Thanks for delivering those important, healthy, revealing and in addition easy guidance on that topic to Emily.

  • cheap jordans

    I enjoy you because of every one of your labor on this blog. Ellie take interest in managing investigation and it is easy to see why. Most people hear all relating to the compelling method you make functional tactics by means of the blog and in addition invigorate contribution from other people on the matter so my daughter is now starting to learn a whole lot. Have fun with the rest of the year. Your conducting a remarkable job.

  • Nike Shoes

    [url=http://www.airmax97.us.com/][b]Air Max 97[/b][/url]

    [url=http://www.max270.us.com/][b]Nike Air Max 270[/b][/url]

    [url=http://www.supplyyeezy.us.com/][b]Yeezy Supply[/b][/url]

    [url=http://www.kobebryant-jersey.us/][b]Kobe Bryant Jersey[/b][/url]

    [url=http://www.kobebryantjerseysforsale.us/][b]Kobe Bryant Jerseys For Sale[/b][/url]

    [url=http://www.kobebryantjersey24.us/][b]Kobe Bryant Jersey 24[/b][/url]

    [url=http://www.kobebryantwebsiteofficial.us/][b]Kobe Bryant Website Official[/b][/url]

    [url=http://www.yeezy-shoe.us.com/][b]Yeezy[/b][/url]

    [url=http://www.yeezymafia.us.com/][b]Yeezy[/b][/url]

    [url=http://www.nikes.us.com/][b]Nike Shoes[/b][/url]

    [url=http://www.nikeshoes.us.org/][b]Nike Shoes[/b][/url]

    [url=http://www.nfl-jerseys.us.org/][b]NFL Jerseys[/b][/url]

    [url=http://www.yeezyboost350.us.com/][b]Yeezy Boost 350[/b][/url]

    [url=http://www.yeezy.com.co/][b]Yeezy Shoes[/b][/url]

    [url=http://www.nikeoutletstoreonlineshopping.us/][b]Nike Outlet[/b][/url]

    [url=http://www.yeezy380.us/][b]Yeezy 380[/b][/url]

    [url=http://www.yeezy380.us.com/][b]Yeezy 380[/b][/url]

    [url=http://www.nikefactory.us.com/][b]Nike Outlet[/b][/url]

    [url=http://www.humanraces.us.com/][b]Human Races[/b][/url]

    [url=http://www.humanracesshoes.us/][b]Human Race Shoes[/b][/url]

    [url=http://www.basketball-jerseys.us.com/][b]Basketball Jerseys[/b][/url]

    [url=http://www.jerseysbasketball.us/][b]Basketball Jerseys[/b][/url]

    [url=http://www.jerseys-nba.us/][b]Cheap NBA Jerseys[/b][/url]

    [url=http://www.nikes-shoes.us.com/][b]Nike Outlet[/b][/url]

    [url=http://www.yeezy-shoe.us.com/][b]Yeezy Shoes[/b][/url]

    [url=http://www.yeezymafia.us.com/][b]Yeezy Mafia[/b][/url]

    [url=http://www.yeezy350v2.us/][b]Yeezy 350 V2[/b][/url]

    [url=http://www.yeezysofficialsite.us/][b]Yeezys Official Site[/b][/url]

    [url=http://www.yeezyslides.us/][b]Yeezy sliders[/b][/url]

    [url=http://www.jerseys-nba.us.com/][b]NBA Jerseys[/b][/url]

    [url=http://www.jerseysnba.us.com/][b]NBA Jerseys[/b][/url]

    [url=http://www.airjordan-1.us/][b]Air Jordan 1[/b][/url]

    [url=http://www.airjordan1.us.com/][b]Air Jordan 1[/b][/url]

    [url=http://www.jordan-1.us.com/][b]Jordan 1[/b][/url]

    [url=http://www.jordan1s.us.com/][b]Jordan 1s[/b][/url]

    [url=http://www.jordan1s.us/][b]Jordan 1s[/b][/url]

    [url=http://www.retrojordan.us.com/][b]Jordan Retro[/b][/url]

    [url=http://www.jordanretro4.us.com/][b]Jordan Retro 4[/b][/url]

    [url=http://www.jordan4-retro.us/][b]Jordan 4 Retro[/b][/url]

    [url=http://www.jordansshoess.us.com/][b]Jordans Shoes[/b][/url]

    [url=http://www.jordan4s.us/][b]Jordan 4s[/b][/url]

    [url=http://www.diorjordan1.us/][b]Dior Jordan 1[/b][/url]

    [url=http://www.airjordan1mid.us/][b]Air Jordan 1 Mid[/b][/url]

    [url=http://www.jordan11concord.us/][b]Jordan 11 Concord[/b][/url]

    [url=http://www.jordan11retro.us/][b]Jordan 11 Retro[/b][/url]

    [url=http://www.jordan1low.us/][b]Jordan 1 Low[/b][/url]

    [url=http://www.jordan11s.us/][b]Jordan 11s[/b][/url]

    [url=http://www.jordanaj1.us/][b]Jordan AJ 1[/b][/url]

    [url=http://www.nbastores.us/][b]NBA Store[/b][/url]

    [url=http://www.nbaoutletstore.us/][b]NBA Store[/b][/url]

    [url=http://www.yeezystore.us.com/][b]Yeezy[/b][/url]

    [url=http://www.yeezyssneakers.us.com/][b]Yeezy Sneaker[/b][/url]

    [url=http://www.adidasyeezyofficialwebsite.com/][b]Adidas Yeezy Official Website[/b][/url]

    [url=http://www.adidasyeezyonlinestore.us/][b]Adidas Yeezy Online Store[/b][/url]

    [url=http://www.airmaxclearancesale.us/][b]Air Max Clearance Sale[/b][/url]

    [url=http://www.nflshopofficialonlinestore.com/][b]NFL Shop Official Online Store[/b][/url]

    [url=http://www.nikeuk.uk.com/][b]Nike UK[/b][/url]

    [url=http://www.yeezy.uk.com/][b]Yeezy[/b][/url]

    [url=http://www.yeezy350.uk.com/][b]Yeezy 350[/b][/url]

    [url=http://www.adidasyeezy.uk.com/][b]Adidas Yeezy[/b][/url]

  • frolep rotrem

    It is perfect time to make some plans for the long run and it is time to be happy. I’ve learn this post and if I could I wish to recommend you some fascinating things or suggestions. Maybe you can write next articles referring to this article. I want to learn even more things approximately it!

  • jordan sneakers

    Once I originally commented I clicked the -Notify me when new comments are added- checkbox and now every time a remark is added I get 4 emails with the same comment. Is there any way you can take away me from that service? Thanks!

  • goyard handbags

    Oh my goodness! an incredible article dude. Thank you Nevertheless I’m experiencing issue with ur rss . Don抰 know why Unable to subscribe to it. Is there anyone getting similar rss drawback? Anybody who knows kindly respond. Thnkx

Leave a Reply

Your email address will not be published. Required fields are marked *

error

Enjoy this blog? Please spread the word :)

LinkedIn
Share
Instagram
Follow by Email
RSS
WhatsApp