10 October, 2020
2) Interactive commands:-
How to handle java scripts alerts &pop-up and child window?
How to handle java scripts alert?
To handle the alerts we need to navigate from the browser to alert then we can perform either ok or cancel
At TekSlate, we offer resources that help you in learning various IT courses.
We avail both written material and demo video tutorials.
To gain in-depth knowledge and be on par with practical experience,then explore Selenium Training.
Accept():- It is to click OK on the dialog alert & confirmation alert.
Dismin():- It is to click cancel on the confirmation alert
Gettext():- we can take text or label from the application where the web driver is having the
String str =driver.switch to().alert().get text();
** write a program to search for one way flights in spicejet.com then hit ok on the at confirmation
Alert message.click on the popup click on the close button to close the popup. select any convert
converter link then enter values in the popup click on the close button to close the popup. select
any value from going to find in the main window.
To handle the popup we need to navigate from the main window to pop-up with the help of below
Driver.switch to().window(“window name”);
we are unable to take the main window name by using selenium.ioe
Check out the top Selenium Interview Questions now!
Get window handling:-
It will return the window name where the web driver is having the focus into a string.
String str=driver.getwindow handle();
** How many we can automate per day?
It always depends on the project and test scenarios. But on average we
Can automate 5 to 6 scenarios per day.
It means we are taking 1 to1.5 hour for one test scripts why?
2) write scripts[test dater,locator]
4) stable the script
Based on the above statistics we can provide the plan [test plan]
For an Indepth knowledge on Selenium, click on below