TestNG in selenium provides a mechanism to minimize the test execution effort by parallel execution of the tests on different browsers simultaneously
An authentication pop up in selenium is similar to alert, where the browser displays a prompt at the top of the screen. The only difference between the authentication pop up and an alert box is
Similar to browser navigation commands, selenium also provides certain options to handle keyboard events. This helps in simulation (key press, page up, page down, Ctrl +
Selenium comes preloaded with many cool features and simulating the browser navigation is one of them. It allows a user to simulate forward, back, refresh etc. commands from selenium.
Imagine you have a large automation suite which executes at night at some scheduled time. Skimming through the failed scripts would be a nightmare in the morning. However, Javax mail API make things easier as it could be used to send email for failed step in selenium.
It happens occasionally that a test which was working fine earlier gets failed during execution. If you execute it again, it would get pass. To overcome this issue TestNG provides a listener which would retry to execute failed test cases for a given number of times.
Screenshots play a vital role in testing. These can be used as evidence for functionality under test, raising a defect or for asking a query etc. During automation, regression suite is usually executed in a remote machine or during off-hours.
In web applications, if you leave mandatory fields blank and try to save the page, those fields generally get highlighted in red color. We can use this color property of web elements to identify if any field is left blank.