How would you fill in a form on a webpage (not under my control) in an Android program?
I want to write a little android program to automate interacting with a website that someone else has written and I can't change. It has no published API. So the process is:
- Fetch the web page with a form on it (eg a login page)
- Parse it (eg find the username, password box on the page)
- Do some processing (eg fetch a username and password from a database)
- Submit the form back and get the result (eg simulate the user hitting login)
- Repeat ...
It is step 4 I'd like the help with. If I wasn't using Android I'd use a library library like libcurl (for python) or apache httpclient (for normal java), or I'd do some DOM interaction with a webbrowser. What would you recommend doing for android? Is there something built into the standard libraries you'd recommend?
I'm a pretty experienced Java programmer but all I've written in Android is hello world, if that affects your answer.