I'm trying to do something basic. I just want to open a new window and then in that window, open 2 tabs, using OSX Yosemite's new javascript bridge. I can't find docs that show how to do this:
ObjC.import("Cocoa");
chrome = Application("Google Chrome");
chrome.includeStandardAdditions = true
chrome.open("test1tab.com");
chrome.open("test2tab.com");
I'm ignoring the standardAddiions line, mostly because I used it and it returned an error when trying a basic beep(). Also note that I had to write out the full url for it to work!
(p.s. I edited a junky version out, then saw you originally wanted 2 tabs, so here you go)