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?



How can we capture screenshots in selenium?..

Answer / 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

More Selenium Interview Questions

Can you use Selenium to test the Rest API or Web services?

1 Answers  


How can you mark a test case as failed by using soft assertion?

1 Answers  


How does one submit a form in selenium?

1 Answers  


How to launch a browser using selenium webdriver?

1 Answers  


How can you run selenium server other than the default port 4444?

1 Answers  


What is the difference between driver.close() and driver.quit command?

1 Answers  


How to perform right click using selenium webdriver?

1 Answers  


Can you write the code to double click an element in selenium?

1 Answers  


Do you know a way to refresh browser by using selenium?

1 Answers  


How can the user get a text from a web element?

1 Answers  


What are the advantage and features of selenium ide?

1 Answers  


How to handle alerts in selenium webdriver?

1 Answers  


Categories