In a Webpage with AJAX I need to wait until the Ajax is executed. This is done after pressing a enter in an input field (Pressing the enter is done by code ). The Wait For WebView1_PageFinished(Url As String) is not working. I can't even see the alert event. Could someone help me?
B4X:
Dim js As String = $"e=jQuery.Event('keyup');
e.which = 13;
e.keyCode = 13;
$('input[name="test"]').keypress().trigger(e);
$(document).ajaxComplete(function() {
alert("This is an Alert!");
});"$
joWV.RunMethodJO("getEngine", Null).RunMethod("executeScript", Array As String(js))
Wait For WebView1_PageFinished(Url As String)