Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can we capture screenshots in selenium?

Answer Posted / Navneet Kumar

To capture a screenshot in Selenium, you can use the `TakesScreenshot` interface. Here's an example:
```
FileUtils.copyFile(driver.getScreenshotAs(OutputType.FILE), new File("screenshots/screenshot.png"));
```

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know how to locate a link using its text in selenium?

962


Have you created any framework?

1020


what will be the first salary and what will be the hike in the salary?

910


How can you fetch an attribute from an element? How to retrieve typed text from a textbox?

1178


What’s selenese?

905