Hello Naveen Sir. Thank you from bottom of my heart🙏🙏🙏 for making such useful contents in ur channel through which we gained so much knowledge. Because of urs video in Java, selenium, api and all I got placed in one of the renowned company in UK as software tester after a 5 years of career gap. I was a manual tester in my previous company but learning thru urs video I got so much confidence in automation that helps me alot to face the interviews in automation profile. You are doing great sir...thank you once again sir🙏🙏🙏 . You are true gem🤩🤩. Hopefully you read this msg🙂
Thank you so much, your videos are really helpfull ! When I feel automation challenging, I just watch your videos and it gives me solution. Thank you !
Hi Naveen, The question here is switching to a specific window, lets say out of 100 windows i need to switch to the 25th window then instead of switching to all windows and getting the title, u should be able to switch to the 25th window directly with one line of code based on the index of the list, the code should somewhat look like this Set windowhandles = driver.getwindowhandles(); ArrayList windows = new ArrayList (windowhandles); driver.switchTo().window(windows.get(i)); where i is the index of the window to be switched;
Well explained and good to create generic functions as you have explained to easily move between and title is a good assertion point!! Keep up the good work!!
@Naveen, yesterday I had interview with L&T and he asked me that if the chrome version is keep on changing every week then how would you handle this? We are not supposed to do any manual intervention in this case.. Could you please help us with this question as well?
Hi Naveen, You are videos help us a lot. I have a little different question. We use MQs in between the webserver and app servers to log the communications. We use SSH client to fetch these logs and validate them. How can we automate this, because the logs are live and keep coming?
Hi Naveen, I have a question regarding scroll into view. May I know, how can we implement the scripts to identify the specific web element without using scroll into view with some action. that means I need to set up the window page size such as chrome zoom % then we won't need to scroll down then click due to by default it is using 100% zoom & it doesn't matter whatever I have set up my chrome zoom % in current setting instead of the window size (dimension setup).
Thank you for the video. However could you also make a video on how to use this SwitchToRightWindow as a reusable method in a different Java Class as it is not feasible to write such huge block every time.
Why did we have to convert set into arrayList, is it because set doesnt maintain any order, however we would be still able to iterate a set. So why we are converting?
@tushar, there are multiple ways to schedule your automated tests 1) You can create a batch file and place that in the windows task scheduler 2) You can create Jenkins pipeline and set the trigger 3) You can create pipelines on Azure/AWS and schedule the trigger
Hi Naveen I want to open a multiple windows and by closing all the windows I want to switch on parent window. Also want to get the title of all the window. Could you please help me to resolve this
HI Naveen while switching to next window in IE browser, am getting "NoSuchWindowException : unable to get browser " could you please help me out in this
Hi, please guide me on the below query. Im an automation engineer (3.5+ Selenium + java, C# + Jenkins). For my career growth should i continue as Automation developer or move to DevOps? If yes then what could be the ideal experience to switch into DevOps? Will staying in Automation will be as same as DevOps in terms of profitability? Thank-you in Advance 😊
Hi Naveen i have interview questions like if we have open 4 windows and but want to close 3rd window I'm any window from four of them so this code can we make work for it
You can provide some identification to 3rd window and switch to that window by using driver.switchto().window(3rdwindowidentification); And then use driver.close();
Here, you are switching to all the open tabs and compare the title in rightwindow method, that means execution time will effect we really have 100 or more than windows. Can not we switch to required window without compare the title? Using index also may not work if open window order change. How can we achieve in this scenario?
Set will not maintain the insertion order, the elements are store based on hashcode values... However its impl class Linked HashSet maintains the insertion order.
You have to first store 10 tabs handles in Set initialTabs =driver.getWindowHandles(); Then again use same Set PostTabs =driver.getWindowHandles(); Now you can easily identify newly opened tab by differentiating initialTabls & PostTabs
If someone wants homework then he can go ahead and print what was the index of the opened tab. For eg. What was the index of the facebook tab out of all opened tabs
No one will beat you on the Selenium concepts explanation
Hello Naveen Sir. Thank you from bottom of my heart🙏🙏🙏 for making such useful contents in ur channel through which we gained so much knowledge. Because of urs video in Java, selenium, api and all I got placed in one of the renowned company in UK as software tester after a 5 years of career gap. I was a manual tester in my previous company but learning thru urs video I got so much confidence in automation that helps me alot to face the interviews in automation profile. You are doing great sir...thank you once again sir🙏🙏🙏 . You are true gem🤩🤩. Hopefully you read this msg🙂
something out of box question and you swiftly handle it Naveen. I say its incredible
Thank you so much, your videos are really helpfull !
When I feel automation challenging, I just watch your videos and it gives me solution.
Thank you !
Hi Naveen, The question here is switching to a specific window, lets say out of 100 windows i need to switch to the 25th window then instead of switching to all windows and getting the title, u should be able to switch to the 25th window directly with one line of code based on the index of the list, the code should somewhat look like this
Set windowhandles = driver.getwindowhandles();
ArrayList windows = new ArrayList (windowhandles);
driver.switchTo().window(windows.get(i));
where i is the index of the window to be switched;
But here u don't know the exact index number.
Well explained and good to create generic functions as you have explained to easily move between and title is a good assertion point!! Keep up the good work!!
Wonderfull Explanation..but only thing is no need to use list if we can do the same with set as well. 🙏
One of the finest video and solution
@Naveen : Thank you so much for helping us.
@Naveen, yesterday I had interview with L&T and he asked me that if the chrome version is keep on changing every week then how would you handle this? We are not supposed to do any manual intervention in this case.. Could you please help us with this question as well?
Hi Naveen, You are videos help us a lot. I have a little different question. We use MQs in between the webserver and app servers to log the communications. We use SSH client to fetch these logs and validate them. How can we automate this, because the logs are live and keep coming?
Thank you for the clear explanations.....it helps a lot
Very good explanation, Thanks Naveen!!
Thanks Naveen. Could you also please make a video on the same origin policy. I was asked in the recent interview.
@naveen you are a messiah for QAs
superb superb sir
Your explanation is perfect
It's really helpful video naveen, but this question asked for fresher or experince person, pls mention that thing, for other helpful for
Hi Naveen, I have a question regarding scroll into view. May I know, how can we implement the scripts to identify the specific web element without using scroll into view with some action. that means I need to set up the window page size such as chrome zoom % then we won't need to scroll down then click due to by default it is using 100% zoom & it doesn't matter whatever I have set up my chrome zoom % in current setting instead of the window size (dimension setup).
This guy is Amazing ❤️
Thank you for the video. However could you also make a video on how to use this SwitchToRightWindow as a reusable method in a different Java Class as it is not feasible to write such huge block every time.
Thankyou so much!Sir...very good explanation 👏
Nice Explanation 👏👏 Good Work👍
Thank you 🙂 pleasure :)
Why did we have to convert set into arrayList, is it because set doesnt maintain any order, however we would be still able to iterate a set. So why we are converting?
I have one doubt. why we have converted that set into list? we can itrate in the set too right?
Thank u so much Naveen 👍
Welcome 😊
sir i have mailed you one question please make a short video on that
i have a question why we are using list here,same thing we can achive by set also
why set to list conversion??
Hi Naveen,Is this applicable if we run our code in headless mode?
great explanation
Good explanation naveen
is it possible to run test cases daily on specific time without human intervention. Let me know how?
Using Jenkins it is possible..
@@manjugajre2939 How? kindly share any reference link
Windows schedular ?
@tushar, there are multiple ways to schedule your automated tests
1) You can create a batch file and place that in the windows task scheduler
2) You can create Jenkins pipeline and set the trigger
3) You can create pipelines on Azure/AWS and schedule the trigger
Thank you so much Naveen :)
Hi Naveen
I want to open a multiple windows and by closing all the windows I want to switch on parent window.
Also want to get the title of all the window.
Could you please help me to resolve this
Thank you Naveen 👍
Welcome 😊
Hey naveen trying to contact you, however not able to....
Need your paid videos oly for devops part... please reply
thanks, this was awesome code wrt window handles.
there is no need for List until you want to get the index by using normal for loop
Doesn't matter. You can avoid list also.
why was List created and Set contents put into it? pls can anyone answer?
Awesome sir 👏
HI Naveen while switching to next window in IE browser, am getting "NoSuchWindowException : unable to get browser " could you please help me out in this
Hi Naveen, I got interview qstn for you. "how to switch from one window pop to another window popup in selenium"
Can You explain this scenario
Write a program to convert number into digit and print in descending order and highest value.Can you please help me on this
Hey Naveen, how we can close window without confirmation alert ? Please ans me expecting ans from you
Thank you
Excellent. But after taking set why we are taking array list
Because set are unordered in nature.
Whatever the order, we are comparing again with window title before switch. Why convert to list?
You can use set no issues
Yes, can not we direct use of list instead of set?
@@vinayp959 let us try
I'm gonna try this with streams.
Hi, please guide me on the below query.
Im an automation engineer (3.5+ Selenium + java, C# + Jenkins).
For my career growth should i continue as Automation developer or move to DevOps? If yes then what could be the ideal experience to switch into DevOps?
Will staying in Automation will be as same as DevOps in terms of profitability?
Thank-you in Advance 😊
These xpath is not working for me could you please help
sir i have a question about this chapter that i got an error invaliderror the same code why? and how should i do? plz check and give the teaching
Sir how would anyone would be able to understand what error you’re getting …. Insufficient info
Hi Naveen i have interview questions like if we have open 4 windows and but want to close 3rd window I'm any window from four of them so this code can we make work for it
You can provide some identification to 3rd window and switch to that window by using driver.switchto().window(3rdwindowidentification);
And then use driver.close();
Here, you are switching to all the open tabs and compare the title in rightwindow method, that means execution time will effect we really have 100 or more than windows. Can not we switch to required window without compare the title? Using index also may not work if open window order change. How can we achieve in this scenario?
This is what I mentioned at the end. Please watch it once again.
@@naveenautomationlabs yes, can you do a video with steams as well. I don't have much knowledge on java streams.
Hi Sir,i did not understand why did you convert set to list,Please can yiu explain that!
Just to convert it to order based collection
@@naveenautomationlabs my dear sister learn java first , in english u should learn abcd like that
Is there any chance for two pages have same title, if same how we will achieve switch to window required
@Naveen
Title should be unique always.
I got it Naveen Thanks
Set does not maintain the insertion order?
Set will not maintain the insertion order, the elements are store based on hashcode values... However its impl class Linked HashSet maintains the insertion order.
If i want to go to last opened window(Without using index),can some one please help
Suppose there is 10 tabs open in window , now i have open a new tab. How can we identify recent open tab .
You have to first store 10 tabs handles in Set initialTabs =driver.getWindowHandles();
Then again use same
Set PostTabs =driver.getWindowHandles();
Now you can easily identify newly opened tab by differentiating initialTabls & PostTabs
If someone wants homework then he can go ahead and print what was the index of the opened tab. For eg. What was the index of the facebook tab out of all opened tabs
Yes maintain the counter and keep increasing it. Once Facebook is found. Print the counter.
Thanks
How to switch to correct Alert if there are 6 Alert pop up
How can you get 6 alert pop ups at the same time?
@@naveenautomationlabs this question is asked to me during interview how you can handle 6 pop up at same time?
if we have 100 pages open or more and we are gonna be switching one by one checking title we are gonna do that until next morning.
No one is gonna use 100 windows tbh .. If you do you will find solutions
❤
how can take screenshot of ua code bro