Saved Bookmarks
| 1. |
In Selenium WebDriver, how do you take a screenshot? |
|
Answer» During the execution of the test scripts, test cases MAY fail. We just capture a screenshot and save it in a result repository while manually executing the test cases. Selenium WebDriver can be used to accomplish the same thing. Some of the instances in which we MIGHT need to USE Selenium WebDriver to capture a screenshot are as follows:
TakesScreenshot is a Selenium interface that has a function getScreenShotAs that may be used to take a screenshot of the programme under test. When capturing screenshots with Selenium 3, we may RUN into a few difficulties. We utilize the aShot() function to get around this. |
|