Screenshot using Selenium WebDriver

0 votes
How to take a screenshot using Selenium WebDriver
Apr 9, 2018 in Selenium by xyz
• 1,560 points
97 views

1 answer to this question.

0 votes

Below code will help you using JAVA:

WebDriver driver = new FirefoxDriver();

driver.get("http://www.google.com/");

File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

FileUtils.copyFile(scrFile, new File("c:\\newfolder\\screenshot.png"));//copy the screenshot
answered Apr 9, 2018 by nsv999
• 5,520 points

Related Questions In Selenium

0 votes
1 answer

How to take screenshot of a frame using Selenium WebDriver?

you can use the below code: import java.awt.image.BufferedImage; import ...READ MORE

answered Jun 20, 2018 in Selenium by Meci Matt
• 9,460 points
1,897 views
0 votes
1 answer

Taking Screenshot using Selenium WebDriver

Using driver.save_screenshot('/path/to/file') we will be able to ...READ MORE

answered Jul 12, 2018 in Selenium by Meci Matt
• 9,460 points
417 views
0 votes
1 answer

How to capture screenshot of a webpage using Selenium Webdriver?

Hi Bindiya, you can use TakesScreenshot interface to capture the ...READ MORE

answered Jul 8, 2019 in Selenium by Abha
• 28,040 points
643 views
0 votes
1 answer

How can I capture full webpage screenshot using Selenium Webdriver?

Hey Harbhajan, you can use Ashot() to ...READ MORE

answered Jul 29, 2019 in Selenium by Anvi
• 14,150 points
3,113 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,520 points
4,953 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,010 points
5,730 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
3,502 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,010 points
4,228 views
0 votes
1 answer

I tried to open a new website when a new tab is opened using Selenium Webdriver

Try this code: ArrayList<String> tabs = new ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,520 points
2,411 views
+1 vote
1 answer

How to handle drop downs using Selenium WebDriver in Java

First, find an XPath which will return ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,520 points
5,301 views