Automator - simple javascript link then submit button
Hi,
I'm trying to put together an automator script to load a webpage, click a javascript link and then click on the submit button.
I'm fine with the loading of the webpage in automator, but not sure where to start with the javascript and then the button click.
The javacript code is contained in the following element:
<a id="ctl00_mainContent_lbtnAutoPick" href="javascript:__doPostBack('ctl00$mainContent$lbtnAutoPick','')">Autopick</a >
The submit button is contained in the following element:
<input type="submit" name="ctl00$mainContent$btnSubmitGuessing" value="Submit" id="ctl00_mainContent_btnSubmitGuessing" class="activeBtn">
My question is, what needs to go in the prefilled javascript box (below) in automator to make this work?
function run(input, parameters) {
// Your script goes here
return input;
}
Thanks
Automator-OTHER, OS X El Capitan (10.11.1), Automator