Skip to content

Instantly share code, notes, and snippets.

@case
Created February 20, 2014 18:30
Show Gist options
  • Save case/9120184 to your computer and use it in GitHub Desktop.
Save case/9120184 to your computer and use it in GitHub Desktop.
AppleScript to refresh a Chrome tab at a regular interval
set counter to 0
tell application "Google Chrome"
repeat
tell the active tab of its first window
reload
set counter to counter + 1
log counter
end tell
delay 5
end repeat
end tell
@case
Copy link
Author

case commented Feb 20, 2014

We were debugging a timing issue in a webapp, and needed to refresh the page a bunch of times to watch for the error state. This was quick and dirty, and obviously has room for improvement, but it got the job done. The counter output appears in the Script Editor app's Events pane:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment