Are there elegant methods for simulating user behavior (clicks, inputs) using JavaScript or PHP? I’m envisaging something along the lines of:
- Enter something into a text box.
- Click on the submit button
- Click on a link that shows up on the following page (the location I
can predict, but not the URL itself) - Aggregate the page results
and return to me.
It somehow screams iFrame to me, but are there other ways? Also, the content would be an external website, so iFrame cross-scripting would raise errors.
Take a look at Selenium. It’s being developed to do automated tests on websites and can certenly do the task you described.
You can also export the tests as PHPUnit test.