Curl to press a button on a website (onclick)


I am successfully using curl to set parameters on a website (security system) like this:

{ exec=">[ON:curl http://root:xxxx@] >[OFF:curl http://root:xxxx@]"}

However, I did not figure out yet, how to click a button (onclick) on a website which has the following syntax:
<div id="OutputCH1" class="overview_output_off"><input type="button" value="Steckdose" onclick="ProgramableOutputClick('Radio1')"></input></div>

Any suggestions?

I think you would have to figure out what this JavaScript function does, using your browser’s developer console, and see what kind of HTTP request could result from the button click. It might be an Ajax request or a HTML form post, which you could then simulate with the HTTP binding or an action in a rule.

Thanks, I will try to figure it out.
However, I am not really experienced with this kind of stuff.
Figuring out *.cgi websites and their elements was much easier…

Got it!
Thanks @watou.
With Firefox and playing around with “Analyze element” in the console help to figure it out.

In case someone has an Abus Secvest IP Alarm System as well, just let me know.

1 Like