Note that there are some explanatory texts on larger screens.

plurals
  1. POinteracting with awesominum webcontrol
    primarykey
    data
    text
    <p>Can you find HTML elements in awesomium webcontrol to do the further processing?</p> <p>For example, I can find necessary element (or even element collection) in Watin using:</p> <pre><code>Link playButton = myie.ElementOfType&lt;Link&gt;(Find.ById("myid")); // find link (&lt;a&gt;) Div test = myie.Div(Find.ById("audio")); // find div (&lt;div&gt;) </code></pre> <p>When found - you can extract multiple properties of that element</p> <pre><code>string classname = playButton.ClassName; // alternatively -&gt; inner text, link, id, class and all bucket of other properties </code></pre> <p>How do I do it in awesomium? Does it have built-in DOM parser to operate with website controls? (divs, links, tables, etc..)</p> <p>So far I could only find javascript execution command <strong>but that's not what I'm looking for</strong>..</p> <p>Additionally, I'd like to know how to save webpage's HTML to string (in awesomium)?</p> <pre><code>string mysite = webControl1.SiteHTML.ToString(); // something like this // instead of string mysite = webControl1.ExecuteJavascriptWithResult("document.documentElement.outerHTML").ToString(); </code></pre> <p><strong>EDIT: explaination</strong></p> <p>It looks like awesomium doesnt support HTML element parsing natively, so my backup plan is following:</p> <ol> <li>open webpage in awesomium</li> <li>grab HTML to string (currently using: ExecuteJavascriptWithResult())</li> <li>parse string to HTML (currently using: "HTML Agility pack")</li> <li>do what I need to do (find elements, collection, etc.)</li> <li>execute JS command in awesomium based on previous step results</li> </ol> <p>All of this would be easier if awesomium had DOM support.. but.. well..</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload