Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is likely that the asynchronous AJAX call is still in progress when you are getting the innerHtml.</p> <blockquote> <blockquote> <p>ie.Element(Find.ById("tree")).Click();</p> <p>textbox1.text=ie.Div("appendProdctTreeDiv").innerHtml;// this way is wrong;</p> </blockquote> </blockquote> <p>Try something like this to see if you end up with expected results. This is the not so great way to do it, but checking is easy.</p> <blockquote> <blockquote> <p>ie.Element(Find.ById("tree")).Click();</p> <p>System.Threading.Thread.Sleep(5000); //Waits for 5 seconds; make more than 5 seconds if your async call takes longer.</p> <p>textbox1.text=ie.Div("appendProdctTreeDiv").innerHtml;// this way is wrong;</p> </blockquote> </blockquote> <p>If the site is using ASP.NET, to determine if the page is in an async call you can eval the following javascript.</p> <blockquote> <blockquote> <p>Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()</p> </blockquote> </blockquote> <p>Call like</p> <blockquote> <blockquote> <p>bool isInAsync = bool.Parse(ie.Eval("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()"));</p> </blockquote> </blockquote> <p>However, google.com/ig does using MS AJAX so I cannot come up with a working example using the above javascript.</p> <p>Example using wait and google.com/ig's translation gadget. Put in a different word into TypeText on each run or clear your cache. ie.GoTo("www.google.com/ig"); System.Threading.Thread.Sleep(2000); //Wait for page gadgets to load Console.WriteLine(ie.Frame("remote_iframe_10").Div("dict_content").InnerHtml);</p> <pre><code> ie.Frame("remote_iframe_10").Form("dictForm").TextField("dictQuery").TypeText("bajar"); ie.Frame("remote_iframe_10").Form("dictForm").Buttons[0].Click(); Console.WriteLine(ie.Frame("remote_iframe_10").Div("dict_content").InnerHtml); System.Threading.Thread.Sleep(2000); //Wait for gadget to finish here. Console.WriteLine(ie.Frame("remote_iframe_10").Div("dict_content").InnerHtml); </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    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