![]() OutputType defines the output type for the required screenshot in the above snippet. String screenshotBase64 = ((TakesScreenshot)driver).getScreenshotAs(OutputType.BASE64) Syntax: File file = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE) This notifies WebDriver that it should take a screenshot in Selenium and store it. To capture screenshots in Selenium, one has to utilize the method TakesScreenshot. How to take screenshot in Selenium WebDriver? Since the WebDriver architecture allows a user to interact outside the Javascript sandbox, it is possible, among other things, to take screenshot in Selenium. Testing has become much more straightforward thanks to certain new functionalities incorporated in Selenium WebDriver. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |