Click here to Skip to main content
15,912,205 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I need to take FULL WEB PAGE as an IMAGE from Firefox browser. Is there any other workaround, please advise.

Thanks.

What I have tried:

I have tried 'SHDocVw.dll' samples, but it works with IE only.
Now i am just now started trying with DdeClient. Till, i can get the URL only.
Posted
Updated 8-Apr-16 5:13am

If you're doing this through code, you'll want to use the Selenium WebDriver[^]:
C#
IWebDriver driver = new FirefoxDriver();
driver.Manage().Window.Maximize();
driver.Navigate().GoToUrl(url);
ITakesScreenshot screenshotDriver = driver as ITakesScreenshot;
Screenshot screenshot = screenshotDriver.GetScreenshot();
screenshot.SaveAsFile(@"c:\test.png", ImageFormat.Png);

Selenium WebDriver C# Full Website Screenshots With ChromeDriver and FirefoxDriver - Stack Overflow[^]
WebDriver - Table of Content[^]

That does mean you'll need to take the screenshot from a new instance of Firefox, as it's not feasible to attach to an existing instance[^].


If you want to do it manually, there's a "Take a full page screenshot" button in the developer tools.
 
Share this answer
 
 
Share this answer
 
Comments
NPSSR 8-Apr-16 10:21am    
Hi Richard, Thanks. Still, I couldn't find any samples related to 'firefox' browser. Actually, I need to capture the web page with the search *result that already displayed in 'firefox' browser. Please help.
Richard MacCutchan 8-Apr-16 10:26am    
Thos samples are used to capture an image of your screen. If you want a complete webpage then you need to write your own "screen scraper", and Google will find you some sample code.
Generically, you need to open the browser window to the page, take a screenshot, send messages to the browser window to scroll it down, take another screenshot, scroll, ... then stitch the images together. I know of no automation interface for FireFox to make this easier and I don't have any examples.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900