to use webview in a b4j app, you need javafx. the other choices (eg, webkit.org) are less appealing.
there is 1 way to do what you're trying to do, and within that 1 way, a couple of options.
first, a thank you to member
@TILogistic for his very excellent routine at
https://www.b4x.com/android/forum/t...tml-elements-from-b4j-app.136957/#post-866548
starting at post #10.
assuming the information you are looking for is visible in the web page without your having to trigger some action (eg, by clicking on a button or following an
<a> link), you have to wait until the web page has loaded. the webview will raise an event (_PageFinished) when that has occurred. at that point you can
execute some javascript. (technically, you could simply count to 10 from the time you load the page...)
the 2 options referred to are:
1) obtain the (full) html text. (in your case, probably not useful).
2) obtain the value of a particular element.
there are a number of theories relating to capturing the html text, among them what you refer to as "outerHTML". each method has its adherents and
detractors. for every method proposed, someone has been able to show where it falls short. the version i prefer appears in the attached example.
feel free to use a different version. but if you've already tried a headless chrome without success, then you know this approach not going to work.
as to capturing the value of a particular element, you have to know its name or id, of course.
in the attached example, i've taken
@TILogistic's routine and modified it slightly to show both options. first, it downloads the full html document (once
loaded), then it sets the value of a known element (to make things interesting), then it captures that element and stores it in a variable (to show you how
to capture the value you're looking for).
note: it is still possible the element you are looking for is not actually available after the page has loaded (eg, there could be some kind of callback involved).
in that case you might have to sleep for a few seconds. there is no way to know. the point is: in such a case, if the variable is populated by an asynch call,
you might have to request it more than once. but since you say it's visible on the screen (just not in the html text), waiting for the page to load should be
enough.