I'm building a developer-themed browser in a C# .NET Windows Form Application and want to allow users to use Chrome or Firefox DevTools to edit/debug the current page they are viewing. I have found several repositories online but none of them seem to be what I want.
Example Chrome DevTools
Example Firefox DevTools
The project uses Geckofx60.64 to create an embedded Gecko web browser. I have already tried debugger.html on GitHub but that didn't help me. All I need is a simple way to show website developer tools for any link.
If this is not possible, are there some other developer tools that I might be able to use with this project?
Related
I am developing a website crawler API to scrape a javascript-generated website. The website that we are crawling requires the Javascript to be enabled to fully-render the HTML. I have tried many solutions such as HtmlAgilityPack and AngleSharp, but they are just HTML parsers and they cannot render the page due to missing Javascript capability.
I tried implementing headless browser using Selenium.WebDriver.ChromeDriver, it worked very well in my local machine. However, our production environment is very limited such that only Internet Explorer browser is available and we are not allowed to install any more browser. So this chromedriver did not work, too. Internet Explorer cannot even fully render the website from the browser itself. So IE is definitely out.
Is there a way to scrape a javascript-generated website without having to install a browser? Like implementing a headless browser on a server without that browser installed?
Or is it a dead-end situation. Thanks!
You can try using a solution that uses a fully-functional built-in Chromium and doesn't require installing Google Chrome in the target environment. All the required Chromium binaries will be shipped with the solution.
There are many such solutions for .NET and C#:
CefSharp
An open source .NET wrapper around the Chromium Embedded Framework (CEF). It allows you to embed Chromium in .NET apps.
Supported by community. If you need help with the library use, read docs or ask community. If you need a feature or a bug fix, you would probably need to do it by yourself.
DotNetBrowser
A commercial library that allows integrating a Chromium-based browser with your .NET app to display and process HTML5, CSS3, JavaScript, etc.
It's a proprietary solution supported by a commercial company. If you need help with the library use, read docs or get help from the engineers of this product. If you need a feature or a bug fix, it will be done by the product team as soon as possible. I know that, because I know the engineers from DotNetBrowser team.
WebView2
This control allows you to embed web technologies (HTML, CSS, and JavaScript) in your native apps. The WebView2 control uses Microsoft Edge (Chromium) as the rendering engine to display the web content in native apps. With WebView2, you can embed web code in different parts of your native app, or build all of the native app within a single WebView instance. Supported by Microsoft.
If you need some help, you should contact WebView2 team.
So, I want to automate actions on my website (including some Javascript execution and XPath element findings, performing click/type events) but the thing is that I don't want the endpoint users to install any third party software.
Been looking through many solutions and found out that selenium would be a great solution for my needs, however:
It does require endpoint user to have Google Chrome / Firefox browser installed in case of using chrome/firefox driver that support headless browsing.
So I kept searching and found CefSharp which would embed the browser into my application. That however, it's really a boilerplate solution without the ability to find elements by XPath and compared to selenium is less functional.
My question is:
Are there any other solutions (for C#) for having a functional headless browser, without requiring the endpoint user to have the browser installed so that I could deliver my binary as a ready to use?
I'm creating a Silverlight application which can push notification to other users and I want to display the message to the Browser (my users use IE and Firefox to access my website). I noted that some web browsers such as Chrome, Firefox, IE support display Notification when we access to websites which has notification feature. So how can I do this for both Firefox and IE like this? I'm trying to find the solution but due to my quite bad English I still couldn't. Thanks alot.
I'm creating a web browser that has an automatic loading of specific web pages, but the problem is that the browser that i created using c# in visual studio wont load javascipt, the browser that i created only load html file, but don't support java script. can anyone help me on how to add some functionality on my custom web browser that will support javascript.
WebKit DotNet is the best port of WebKit powerful browser engine into DotNetFramework.
It has nice and easy tutorials and properties and methods to customize.
It has JavaScript activated by default.
http://webkitdotnet.sourceforge.net/ is the official website.
http://webkitdotnet.sourceforge.net/basics.php is where you can find the basic tutorial
Webbrowser control is really crappy. I'm assuming you're trying to scape some kind of website. For this use HttpWebRequest instead.
If you`re trying create your own webbrowser: don't, or use Webkit or Gecko instead.
In case you're using the webbrowser control you will have to enable JavaScript in your Internet Explorer settings, because the webbrowser control is the Internet Explorer or at least the engine of it. IE has local JavaScript disabled by default, so this could be your problem. As user #user3855678 said I would recommend using Webkit etc too.
I wanted to make an application wherein you specify the name of the websites, your username and password and that application automatically logs in to all your accounts in the specified websites. I have done this using windows form application, using a web browser. But i wanted my application to open all these websites in chrome and log it in there. Plz Help
I'd check out the chrome API failing that
Look into getting a handle to the window through window API calls
But why not just a chrome extension?!? Miles simpler
Have a look at Selenium WebDriver
Doing a quick Google search for "chrome C# api" turned up a number of results I think you may find relevant.
I thought the following were particularly promising, if you're willing to accept a few concessions:
Automating Chrome Browser from C#
ChromeDevTools; a C# Library to interact with Chrome's Developer Tools
Chrome Debugging API