Today I've been bouncing all around the internet, and after reading up on a lot of solutions I've decided that writing a Chromium wrapper would be an interesting learning experience; not to mention it would be worthwhile for several projects that I am currently working on.
I know that there are already some wrappers out there (awesomium, berkelium), not to mention some basic tutorials like this one, but I'm looking at writing my own wrapper.
My main interest in doing this is so that I am able to create and access the DOM structure generated by WebKit for use in C#, both before and after any javascript which the html depends on has been ran. I know I could look at using the HTMLAgilityPack and Majestic12 for HTML parsing, but I'm looking to build something on top of a tried and tested engine that is fast, efficient, and will be actively developed for the foreseeable future. WebKit is an actively developed layout engine embedded in some of the most popular browsers, and V8 is an impressive javascript engine, hence the decided use of Chromium.
Seeing as how I do not care about actually rendering any content and instead I am looking to access the structure of the web page, I feel that embedding WebKit in its entirety could potentially be overkill. Even in the instances where I'd like javascript to alter the DOM, I still have no use for rendering the results.
In summary:
All I truly want from Chromium is the ability to create the DOM of a web page, and (optionally) the ability to run said page's scripts using Chromium's impressive V8 engine to further manipulate the DOM. I know that this will be quite an undertaking, but I'm interested to see what you have to say. In short, has someone worked with WebKit and V8 (possibly via Chromium), who could assess the feasibility of this and lend me their expertise (via recommendations for how to approach this)? I know that I could eventually determine an appropriate way of approaching this, but I'm looking to expedite the process a bit. Links or perhaps a relatively short and sweet high-level "This is how I'd do it" are what I'm looking for (aka I don't need anything too terribly fancy).
I'm hoping that what I'm asking isn't too scatter-brained. If you find it too general and want to close this topic, instead of doing so please leave a comment and I'll try to narrow the focus. As I just stated my mind is bouncing around today since I'm coming down with a cold.
I'm on the same path. I'm looking deep on QtWebKit and the implementation done on PhantomJs which is a Selenium like, and worked like a charm on my tests.
When you use QtWebKit, as your driver to WebKit youll save time for next releases of it, because maintain a WebKit Port it
s not that easy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With