Search code examples
seleniumcurlselenium-webdriverwebdriverhtmlunit

Can curl act a substitute for programs like Selenium, HtmlUnit, watir etc?


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


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...