New question #687391 on Sikuli:
https://answers.launchpad.net/sikuli/+question/687391
Dear All,
I want to check if Chrome is open or not,
> if open, add a new tab and type some URL, hit enter- This Part is working
> fine with the below snippet.
>If Chrome is closed then first open it, and add a new tab type some URL and
>hit enter/type the URL in the same tab and hit enter. The below snippet is
>failing to do this part.
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
type("t",KEY_CTRL)
type("l", KeyModifier.CTRL)
type("http://some-url.com")
type(Key.ENTER)
wait(3)
Any leads will be appreciated to let me know where i'm doing it wrong.
Regards,
Pritam
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp