Parse HTML Page and Access Textfields and Buttons on webos

315 views Asked by At

I'm trying to fill out two textfields and press a button programmatically that is opened in a webview in my webos app. Is there any possibility to do that? The website has to be openend in a webview because it refreshes every 30 seconds. (I wan't to log me in automatically to our university's homepage.)

1

There are 1 answers

0
One Crayon On BEST ANSWER

I doubt you will be able to script the contents of the WebView directly (too many potential security issues at stake).

However, you might be able to simulate a Javascript bookmarklet by loading the page and then using the WebView's openURL method to run a bookmarklet that fills out the fields and submits the form (so something like myWebView.mojo.openURL('javascript:DO_STUFF_HERE') might work). I have never had a need to test this sort of thing, but that's the only way I can think of that you'd be able to execute Javascript within a WebView.

Good luck!