0

How can I duplicate the functionality of this sublime script? The code itself says pretty much what I'd like to do:

tell application "Google Chrome" to tell the active tab of its first window
    reload
end tell
tell application "Google Chrome" to activate

I'd like to do this without using some kind of testing framework/driver. Just to understand fundamentally what is going on behind this code. If it's too much work then I'll probably punt and use a Selenium Driver. I'm guessing that some library that Python has made this kind of thing trivial? And, of course, add a macro to Visual Studio/Emacs (or something) to produce the same effect.

lucidquiet
  • 6,124
  • 7
  • 51
  • 88

1 Answers1

1

Just send Ctrl-R to google chrome. There is one API for python here, and that should be enough. It should work, but it might get snagged somewhere else, just send a mouse click using the answer from this question. There really isn't any simple solution unless you have an api for chrome in particular. If you want that, there's a guide here. It should not be too complicated, seems like a simple enough operation to merit its own place in the convenient parts of the API.

Community
  • 1
  • 1
violet_white
  • 404
  • 2
  • 15