Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8719717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:51:55+00:00 2026-06-13T06:51:55+00:00

I am using Selenium WebDriver to take a screenshot of webpages. It runs great.

  • 0

I am using Selenium WebDriver to take a screenshot of webpages. It runs great. However, from the time I hit run in eclipse to the time the screenshot shows up in my local drive is 7-10 seconds. Most of the latency seems to be launching Firefox.

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 can I speed up this process? Is there a way that I can use an already opened Firefox browser to save on opening a new one? Is this code somehow heavy?

Details: Tried on CentOS box and Win7 box both using eclipse. myspeedtest.net shows 22Mbps down and 1 Mbps up.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T06:51:56+00:00Added an answer on June 13, 2026 at 6:51 am

    What you are asking for (allowing WebDriver to attach to a running browser) has been an issue now for almost 3 years. To date, 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")
    

    Quoting the caveat from this page:

    There is beta feature to make firefox not wait for the full page to
    load after calling .get or .click. This may cause immediate find’s to
    break, so please be sure to use an implicit or explicit wait too. This
    is only available for Firefox and not other browsers.

    You can also try loading with a profile and see if that helps at all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to take a screenshot using Selenium WebDriver? (Note: Not Selenium Remote
When I take a screenshot using Selenium Firefox Webdriver (yes, Firefox has flash plugin)
I'm using the Python bindings to run Selenium WebDriver: from selenium import webdriver wd
I have some tests created using Selenium WebDriver. When I run them using IE
How can we get exact time to load a page using Selenium WebDriver? We
I'm using selenium webdriver 2.0 java api to run some tests in my company.
I am trying to take a full page screenshot of a url using selenium
I am trying a select a text from the Dropdown Menu using Selenium webdriver
I am using Selenium WebDriver and run into an issue. In the UI, elements
I have been using Selenium Webdriver successfully with JAR downloaded from their pages or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.