Selenium WebDriver operates very slow

0 votes

I am using Selenium WebDriver to take the screenshot of web pages. the time I hit run in eclipse to the time the screenshot shows up in my local drive is 7-10 seconds. There is a delay in the launching of Firefox.

Below is my Code:

WebDriver driver = new FirefoxDriver();
driver.get("http://www.cnn.com");
File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(scrFile, new File("c:\\test\\screenshot.png"));

How to speed up the execution process?

Aug 24, 2018 in Selenium by Sahiti
• 6,370 points
4,787 views

1 answer to this question.

0 votes

Allowing WebDriver to attach to a running browser - this has been an issue for years. Till now this feature has still not been added. As far as I am aware, there is no way to make Firefox load any faster. You can try a few other tricks though.

fp.setPreference("webdriver.load.strategy", "unstable")
answered Aug 24, 2018 by Meci Matt
• 9,460 points

Related Questions In Selenium

0 votes
6 answers

How to specify "ENTER" button functionality in Selenium WebDriver code?

using OpenQA.Selenium.Interactions; Actions builder = new Actions(driver); ...READ MORE

answered Feb 13, 2019 in Selenium by anonymous
96,195 views
0 votes
3 answers

Can we run selenium tests (Firefox) on WebDriver without a GUI?

Hi ,  Yes, you can use headless browsers ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,190 points
4,025 views
0 votes
1 answer
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,500 points
4,441 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,500 points
13,686 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,190 points
9,149 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,910 points
7,228 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 3, 2020 in Selenium by Sri
• 3,190 points
7,880 views
0 votes
1 answer

Selenium WebDriver typing speed is slow in input text field

It worked for me in the 64bit ...READ MORE

answered Jun 1, 2018 in Selenium by Meci Matt
• 9,460 points
13,078 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP