Welcome Guest Search | Active Topics | Sign In | Register

EO webview - wait for page to finish loading Options
eve
Posted: Monday, June 10, 2019 11:22:55 AM
Rank: Newbie
Groups: Member

Joined: 10/27/2018
Posts: 2
hi, what is the best approach to wait for page to finish loading once i perform javascript click?

Quote:
webview.LoadUrlAndWait(url);
webview.EvalScript("document.getElementById('continue_button').click();");


also, is there also a way how to wait until a certain element is available? (exists in html)

thanks in advance
eo_support
Posted: Monday, June 10, 2019 3:51:07 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,218
Hi,

There is no fixed method for you to wait for this kind of wait because a button click can trigger any kind of action. One way to achieve what you want is to install a callback in your new page's JavaScript code and then wait for that callback code to be invoked. Inside your callback function you can call into .NET code to proceed further. This means that you will need to change your code structure from an synchronous wait to an asynchronous callback fashion. You can find more information on how to call into .NET code from JavaScript code here:

https://www.essentialobjects.com/doc/webbrowser/advanced/jsext.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.