Is it possible to control and instantiate a Chrome browser from C#? Things like opening a new window, changing the URL, reloading the tabs, etc.
I've had a look for a C# Chrome API but can only find a Javascript ones on https://developer.chrome.com/, and the best I could find here was C# - How to control chrome browser - the best answer was to check out the API.
There is an API available for that. It's called 'Selenium', and has a Chrome-specific third party extension.
http://www.seleniumhq.org/
Check that link.
Doing a quick Google search for "chrome C# api" turned up some results I think you may like to consider
I thought the following were particularly promising, if you're willing to accept the concession of using Chrome's developer tools:
Automating Chrome Browser from C#
ChromeDevTools; a C# Library to interact with Chrome's Developer Tools
Chrome Debugging API
Are you looking for something like CEF Sharp?
It's an open source project that allows you to embed Chrome into your .NET application. So you can have those C# controls interact with the browser.
Anyone who has tried Puppeteer? Article about it here. (not C# specific)
Related
I am writing a browser application using C# Language and GeckoFX Browser library.
Now, I want to add the Mozilla Firefox Add-on to my application.
To be precise, I want my application to block undesirable advertisement using AdBlock Plus add-on for Mozilla.
Is it possible to use a Firefox add-on in my GeckoFX control?
Sadly because Firefox extensions are largely based around the interface and working of Firefox's UI, not just the Gecko interface, I don't think it would be possible at all currently to install extensions or .XPI files.
So in order to do this without using an extension, you may have to code an adblocker yourself which I've been trying to do here.
Otherwise, good luck! I've been having similar issues and am looking towards writing my own solution.
I know that there are webdrivers (Selenium, Microsoft webdrivers for IE) which exposes APIs to modify web pages and possibly minimize or maximize browser window.
Is there any API from any webdriver which can modify/add web sites into compatibility view list by going through "Tools->Compatibility view settings->Add this Web Site->Add" ?
I want to achieve this on IE 11 using any programming language, preferably using C#.
No there is not. Selenium does not provide any mechanism to force browser to change the compatibility at this moment. See my answer how I am handling this. Virtual machines with NUnit console probably the easiest way to handle the compatibility. Also this can be helpful for you.
Modern.IE is a good alternative, since Selenium doesn't support what you are asking.
I was looking for a way to embed a page that hosts WebRTC video such as the demo from http://www.webrtc.org/demo into a WinForms app so the user doesn't need to install nor launch any external browsers that may contain toolbars, etc, I looked into a few components such as GeckoFX and WebKit.Net but they fail to load the webcam video.
Do you know of any hack or other project that may support WebRTC inside .Net?
Thanks a lot
Chromium Embedded Framework claims to support WebRTC (I haven't confirmed it myself).
https://code.google.com/p/chromiumembedded/
http://en.wikipedia.org/wiki/Chromium_Embedded_Framework
WebRTC is supported by Mozilla Firefox:
http://www.webrtc.org/
If you want to embed Firefox in you project you can easily embed GeckoFX web browser control in your Windows Forms application.
The GeckoFX engine (Mozilla Firefox) says it can use WebRTC. This seem to be right (as far as I have seen yet) but there seem to be a problem with some parts of it. I'm using it actual for WebRTC and have a problem with the video part - see here: Embedded GeckoFx in C#.NET - WebRTC Video not working
I've been tasked with building a screen scraping application, and I'm looking for information on the best way to cope with web pages that would normally require user input and interaction.
Can this be done via standard web / javascript coding. Is there any API that would allow a desktop application to achieve the same effect?
Thanks for any advice.
Selenium RC can do this: http://seleniumhq.org/
You could use Selenium IDE (firefox plugin) together with firefox for a simple easy and free solution
IRobotSoft Web Scraper is also a good choice. See http://irobotsoft.com/help/.
I have a utility that I put together that uses the .NET Framework to capture an image of a web page so that I can use the thumbnail image to preview a page. There are sites which offer this service like websnapr.com, kwiboo.com and shrinktheweb.com. I would like to instead do it myself and leverage Firefox (Gecko) and Safari (WebKit) to render the image.
Is there anything available to do this currently? Is there a C# project that hooks into Gecko and/or WebKit to create images of a loaded web page.
My project is called WebPreview and it uses the WebBrowser control from the .NET Framework, but since that can be a bit outdated the rendered screenshots will not look as accurate as a recent Gecko or WebKit build.
http://www.smallsharptools.com/Projects/WebPreview/
Please post a comment for any Open Source projects which can help me.
I use a Firefox add-on called Screengrab
checkout http://browsershots.org/ its free and open. it says somewhere on the site what plugins and techniques they use...
You can look a this project http://www.codeplex.com/url2jpeg. It uses Internet Explorer.