Is tat possible to get a screenshot of a webpage using asp.net without any exe?
If so please provide me some details or links.
Note: Since my hosting provider doesn't allow exe's to run, I can't use exes
Thanks in Advance
You can use something like Awesomium:
http://awesomium.com/
It's a fork of the Chromium browser, and has managed wrappers. It's designed for capturing screen shots and doing other "browser" things without the context of a window.
find some threads in stackoverflow, they maybe be helpful.
Javascript to take a screenshot of a website without using ActiveX
Take a screenshot of a webpage with javascript?
Related
I tried WebBrowser but any solution related to WebBrowser I find uses the exact same codes, WebBrowser.DrawToBitmap
Problem with that is, it gives out inaccurate results depending on URL, to what page actually would look like, sometimes even blank pages.
So I am looking for any alternate solution to WebBrowser if there is any.
It needs to run in background, as in not open any browser on screen, render it in background with all scripts and get an image.
If I understand what you're trying to do, you might be interested in a framework called PhantomJS, which is a WebKit "browser" engine which runs the pages without visually rendering them. It can be used to capture screens.
Now this technique requires JavaScript, but there is something called Selenium WebDriver to help you wrapping that. Users here at SO posted a simple example and this comment looks useful as it contains the list of required Packages.
We have a web application and we want to use Windows Native UI Automation API for .Net to automate that.
I've been looking into this for hours, but couldn't find anything. I can get to the windows parts of the internet explorer, like menu, minimize button, maximize button, close button etc but not able to go inside the page opened. I am wondering if it is possible at all. If it is, then can someone please point me to the right direction?
Thanks!
I ended up using WatiN along with Windows Automation API. Thanks everyone who showed interest in this. Appreciate it.
I want to take a screen shot of list of websites and save them
i have got and completed the code which i have got it from here in StackFlow from LB
that exact code does awesome job.
I am able to get the full Page.but there is a problem in that
I want to take images of these and many such websites.they load really late(or load only when you scroll to those areas of the page)
they take long time to load and some times they load only when you scroll to that area of page.
I ma using default webrowser of .net
so if i take a screenshot it will take before the page is completely loaded.
checking the PageComplete event is not helping in this case. As it is showing completed event thought the images are still in loading stage.
Sleep is also not helping.
Cant use third party tools. so please help me. i saw many links for that and cant use or pay for them
does any one has any idea?? Please help.
You can use a third party library called Selenium to wait for specific elements in the DOM to load before taking your screenshot. This library is normally used for automated testing of webpage user interfaces. More details can be found here.
Selenium is capable of working with different browser types (you did not specify which browser you are working with in your question), so you will need to do some further research based on this. Searching for something along the lines of "Selenium element visibility" with your browser type will lead you to the required functions.
I need to surf on a web page using a C# window application (with a browser tool on it), and collect information for my data mining project. I need a tool that help me invoke events like click and refer to objects with a jQuery or css selectors like syntax to read them and save in database.
I try watin but that is just for testing my own web application.
You might want to try Selenium...
We use it for automated Regression Testing
http://seleniumhq.org/
We sometimes use Selenium for web scraping.
I am developing web browser in C# windows form application using WebBrowser component.And also a website in ASP.NET using C#.Both are different projects.How can i use value of Label from windows form application and use the same value in ASP.NET website?
Help me !
Thanks in advance !!
Did you know you can write code to automate browsers, such as IE or Firefox? I mean, write code to launch a browser window, load pages at will, easily access particular parts of web pages, simulate user input (textboxes, controls, buttons, etc). It's commonly used to automate testing of web pages, and what-not.
There are multiple libraries out there, but I personally tried WatIn: http://watin.org/. Open source (free), .net component, easy to use, ton of examples.
I'm suggesting this as an alternative - if it fits your model. I know this doesn't answer your question; sorry.