Question

I need to script some web forms pages and curl appears to be the answer as it has PHP support.

However the form uses JavaScript menu tabs and I am not quite sure how curl locates the links and clicks them for the other pages to come up. I tried Selenium and it worked right away. If I use Selenium to locate the IDs of the form elements can curl be scripted to locate those elements, then click them, enter the values and click the submit button?

Htmlunit is another I'd like to try

Was it helpful?

Solution

No. curl is not a functional testing tool and does not know anything about html or your page's DOM (document object model) to be able to interact with it. That's not to say you can't use curl and pass the response to something which does understand html...

OTHER TIPS

Maybe it is a late answer. I have worked with htmlunit through Java. It is very handy and useful. You can find lots of toturials online. Also, it partially supports javascripts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top