javascript - Android - Check if element exists inside WebView (in the DOM) -


is there easy clean way check if particular element (given id) exists on web page has been loaded inside webview.

i know in javascript can use document.body.contains(element); check if element present or not.

how can use in flow of android app find if element present or not (before executing other statements based on existence of element)?

as can see there, possible find out whether webview contains string.

so, if webview contains unique strings, possible check following:

string string = "text want find"; webview.findall(string); //works api levels 3 - 16 webview.findallasync(string); //works api levels 16 , 

but malicious because impossible make strings in ui unique.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -