Applescript/Javascript to click submenu item of Jupiter Notebook in Safari
An easy way to do this is to use the Automator "Watch Me Do" feature, then convert it to Applescript.


Open the Automator app and create a new document.
Select "Workflow" as the document type.
Now make sure you have Safari open to the page you want it to.
Go back to Automator and click on "Record." There should be a small black window that pops up showing Automator is recording.
Go to Safari and do whatever action(s) you want to automate.
Stop the recording.
Go back to Automator and there should be a new action that looks somewhat like this:

You may need to adjust the playback speed using the slider to make it work properly
Now you can just leave it like this and convert it to an application so you can double-click it to run, or:
See here to convert it to AppleScript so you can use it in Script Editor