Question: I'm curious if AppleScript can access each specific tab in a browser and execute some javascript in them. 

Anyone have ideas?

Answer: 
For **Google Chrome**, use `execute` from AppleScript Chromium Suite:

> 
> **execute** v : Execute a piece of javascript.
> 
> 
> **execute** *specifier* : The tab to execute the command in.
> 
> 
> **javascript** *text* : The javascript code to execute.
> 
> 
> 

Example:

```
tell application "Google Chrome"
    execute front window's active tab javascript "alert('example');"
end tell

```

Can be done in **Safari** either:

```
tell application "Safari" to do JavaScript "alert('example')" in document 1

```

For other browsers, check the functions at `File -> Open Dictionary` on AppleScript editor.
Recently Google Chrome disabled the ability to execute JavaScript via AppleScript. I'm having trouble finding a reference link, but in Chrome Canary v59 it doesn't work and gives a message saying it's disabled, and I'm seeing it still work in Chrome v57 so it's got to be very new.