Can you find HTML elements in awesomium webcontrol to do the further processing?
For example, I can find necessary element (or even element collection) in Watin using:
Link playButton = myie.ElementOfType<Link>(Find.ById("myid")); // find link (<a>)
Div test = myie.Div(Find.ById("audio")); // find div (<div>)
When found - you can extract multiple properties of that element
string classname = playButton.ClassName; // alternatively -> inner text, link, id, class and all bucket of other properties
How do I do it in awesomium? Does it have built-in DOM parser to operate with website controls? (divs, links, tables, etc..)
So far I could only find javascript execution command but that's not what I'm looking for..
Additionally, I'd like to know how to save webpage's HTML to string (in awesomium)?
string mysite = webControl1.SiteHTML.ToString(); // something like this
// instead of
string mysite = webControl1.ExecuteJavascriptWithResult("document.documentElement.outerHTML").ToString();
EDIT: explaination
It looks like awesomium doesnt support HTML element parsing natively, so my backup plan is following:
All of this would be easier if awesomium had DOM support.. but.. well..
With regards to the "How can I get the HTML" question, I seem to recall using a semi-hacky way of doing this when I ran into this problem:
var control = <some awesomium WebControl instance>;
control.SelectAll();
control.CopyHtml();
var html = Clipboard.GetText();