Rank: Member Groups: Member
Joined: 1/14/2016 Posts: 28
|
on our document webView1.EvalScript will Executing JavaScript Synchronously
but in my test
for(int i = 0; i < 999;i++) { jsret = (string)webViewMain.EvalScript( "document.getElementById('xxxx"').parentElement.parentElement.parentElement.parentElement.children[1].children[0].children[1].innerText"); // I must add next code, other way it will throw exception , so if EvalScript is Synchronously why should we do this while (!webViewMain.CanEvalScript) { Thread.Sleep(200); } jsret = (string)webViewMain.EvalScript( "document.getElementsByClassName('total')[0].innerText"); }
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
|
Rank: Member Groups: Member
Joined: 1/14/2016 Posts: 28
|
Code: C#
while (!webViewMain.CanEvalScript)
{
Thread.Sleep(200);
}
why I add above code is because evalscript throw exception since EvalScript is Synchronously It should not throw exception
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
You can create a test project and send it to us. Once we have that we will investigate further.
Thanks!
|