When I run a.ipynb
jupyter notebook file in Safari, it opens at local host http://localhost:8888/notebooks/a.ipynb#
.
NOTE: The script should work for any *.ipynb
file, a.ipynb
is just an example. Also, the website is at the frontmost app while running the code.
How can I write an Applescript (may be using JavaScript) so that I can click the menu Run All Below
button in that tab of safari submenu ?
Here is my attemt:
tell application "Safari"
activate
end tell
tell application "System Events"
tell process "Safari"
click menu item "Run All Below" of menu "Cell" of menu bar 1
end tell
end tell
But, this did not work. I am very new to applescript and generally only use Python.
How can I click the required menu "Run All Below" ?
Related Links:
Using Javascript | Applescript to click button in Safari
https://stackoverflow.com/questions/24917282/click-on-safari-web-page-button-using-applescript