I am trying to programatically execute javascript
on my WebView
.
Here is my code:
private async void wbView1_Navigated(object sender, WebNavigatedEventArgs e)
{
var result = await wbView1.EvaluateJavaScriptAsync("document.getElementByClassName('load_more_btn ib');");
await Task.Delay(10);
}
And here is the HTML from the page:
<div class="center ib-parent">
<a data-load="loadmore_category" href="#" class="load_more_btn ib">Load more</a>
</div>
It is a "Load More" button which actually loads more content and gives me access to what kind of inforormation I need.
Now obvisouly, EvaluateJavaScriptAsync
is not doing the trick here. It is not clicking the button or executing the javascript necessary to load more content.
Is this the correct way to "click a button" programatically in a WebView
?