Selenium WebDriver Tutorial #25 - How to Handle Multiple Windows in Selenium

preview_player
Показать описание
In this Selenium Webdriver Tutorial we will learn How to Handle Multiple Windows in Selenium WebDriver.

When you click a link which opens in a new window will focus the new window or tab on screen, but WebDriver will not know which window the Operating System considers active.

In order to work with the new window you will need to switch to it. Selenium WebDriver provides method to switch between windows and tabs.

Help me in spreading the knowledge, please hit LIKE, SHARE and SUBSCRIBE for latest tutorials. More tutorial playlists below:

🔶 ENROL IN MANY FREE TRAININGS ON RCV ACADEMY PORTAL 🔶

🔶 FOLLOW US ON TWITTER 🔶

🔶 LIKE US ON FACEBOOK 🔶

🔶 OUR TUTORIAL WEBSITES 🔶

🔶 GET MY TRAININGS ON UDEMY 🔶
#SeleniumTutorial #SeleniumTraining #TestAutomation #SeleniumWebDriverTutorial #SeleniumWebDriver #SoftwareTesting #RcvAcademy #SoftwareTestingMentor
Рекомендации по теме
Комментарии
Автор

if we don't want to use iterator method, we can use loop also to switch window:
String parentWindow = driver.getWindowHandle();
driver.findElement(By.xpath("//span[contains(text(), 'Start my free trial')]")).click();
Set<String> WH = driver.getWindowHandles();
for (String S1 : WH) {
if (!S1.equals(parentWindow)) {

}
}
Thread.sleep(3000);


adityagupta-ywkr
Автор

Thank you sooo much sir for the clear and awesome explanation. Thanks again.

agnihotrimanoj
Автор

Can we passing the control from child to child window or I came back to parent window from child then go for next child ? Correct me

karnataka
Автор

I'm new in testing from Taiwan.
Really love this Selenium WebDriver Tutorial.
Very helpful and thank you so much~~

simpleton
Автор

You are the best...really in love with the way you explain.
I had went through lot of tutorials on window handling, but never got clarity.

askatahn
Автор

Awesome explanation. I have to see 3-4 different video on youtube to understand this concept. Your video clear all the confusion.

navneetmittal
Автор

Very good explanation Sirji....I m your big fan sir...

rajendranavale
Автор

the best instructor and the best content ever

nouranwaled
Автор

Hi Software Testing Mentor
Your videos content is very helpful.Thank you !
i have small doubt, If we want to handle more than 3 windows, then how we need to automate?.Please make small video!!Its my request

srivallisharma
Автор

I loved the way u explained inthis.., now it looks easy. other videos created chaos in mind.
note- A beginner

nukulkadam
Автор

Very helpful and well explained, thank you, worked for me!

TheAllanazarpour
Автор

Thank You so much sir..!!! Simple & Superb Explanation..!!

ganeshswami
Автор

Thank you so much for these detailed information, i was finding this concept bit difficult but you made it so simple for me to understand.

sandeepdash
Автор

Thank you very much Sir. I'm your new subscriber.
your teaching is awesome. Thanks

priyasai
Автор

hi, , ,
your videos amazing, they are so neatly explained.T hank You!

suhasiniraj
Автор

xpath does not work. don't know why. copy as "
Trying to write down my own XPath - doesn't work either - not the first time happened by the way. can't find the solution.

dmitryneve
Автор

Most of the website given by you is not working any more

xyzabc-lkmj
Автор

Hello thank you for sharing this video. Sorry but i found this title as misleading, I was looking for automation handling between 2 window browsers but here you referred to new windows as 'TABS'. Your video is showing switching between TABS not windows as per my understanding. Do you have any content on using multiple windows please? Many thanks.

ADD-oleb
Автор

I have parent and child window. I switch to child window, do the needed operations and do driver.close. In this case do we have to write switch to parent window code?

nagadhanyamraju
Автор

thanks sir, can you provide assert and screen shot video in framework.

arunsinghal