← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #161857]: Trying to make Google Chrome open a new tab.

 

Question #161857 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/161857

RaiMan proposed the following answer:
as mentioned by Silverallis:

your problem is the type (read: http://sikuli.org/docx/keys.html#key-
modifiers about the 2nd parameter of type):

type("t", KEY_CMD)

one more thing:

this snippet gives more flexibility then swichApp() (read:
http://sikuli.org/docx/globals.html#the-application-class)

ac = App("Google Chrome")
if ac.window(): # already open?
  ac.focus() # then just switch to it
else: # not yet open
 ac.open()
 while not ac.window(): wait(1)
# now the chrome window is frontmost

with this approach you can do different things, based on chrome already
open or not.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.