Calling Javascript function in Applescript -
i trying automate javascript function call on external webpage.
the line of code want execute triggered click of div
<div class="vote_btn 151" onclick="vote('151', 'california square red paso','145');"> vote ►</div>
instead of automating clicking of div, skipping calling vote function. attempting in 2 browsers. here applescript safari:
tell application "safari" javascript "vote('151', 'california square red paso', '145');" in document 1
and chrome:
tell application "google chrome" tell window 1 tell tab 1 execute javascript "vote('151', 'california square red paso', '145');" end tell end tell end tell
the problem is, getting weird errors. chrome, says "vote not defined" , safari "variable vote not defined". seems applescripts aren't able access javascript? know there similar questions on stackoverflow have read , tried of solutions them no successful results. appreciated!
Comments
Post a Comment