Click here to Skip to main content
15,899,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is it possible to use a headless browser in the c#.net windows service application to capture the image of one of the website pages and stored as a binary format in the database. Does anyone have any idea how to achieve this using a headless browser?

What I have tried:

I did some research but haven't found any solution to this.
Posted
Updated 5-Aug-20 20:35pm

Not at all sure how you'd do it, but it should be possible in Chrome - but this may help: Using a headless browser to capture page screenshots[^] If nothing else, you possibly could automate that?
 
Share this answer
 
tldr; 'yes', its possible

I would use Selenium to drive Chrome or a browser of your choice - that way you can use a 'locator' to select the image - use Selocity from Ranorex or Development mode in Chrome to get the ID of the image 'pane'/'window' etc

Using Selenium, you could also (although it's not what you asked for) screen shot the entire page and save it ... Taking Screenshot using C# with Selenium – Selenium's Tutorial[^]
 
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