Selenium Example which takes screenshot as well the source code
Below is a piece of code which 1. navigates thru some craigslist pages 2. Takes a image screenshot and save it to a file 3. Saves the source code into a file 4. Pauses briefly for user to review the page import org.openqa.selenium.By; import org.openqa.selenium.OutputType; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.ExpectedCondition;…
Read More