【发布时间】:2014-09-15 00:55:46
【问题描述】:
我试图弄清楚如何点击网页中的按钮。例如点击谷歌网页中的“手气不错”按钮。
这是我尝试过的:
tell application "Safari"
make new document with properties {URL:"https://www.google.com/"}
do JavaScript "eval(document.getElementById('I'm Feeling Lucky').parentNode.href.substring(11))" in document 1
delay 1
end tell
但它不起作用。你们中的任何人都知道如何使用applescript单击按钮吗?
非常感谢您的帮助
【问题讨论】:
标签: javascript html safari applescript