How to create multiple app instances out of one app - chrome?

Asked by Shekhar on 2018-01-24

Hi,
I need the different browser windows of my google chrome browser to be treated as a distinct applications by sikuli. I would like to use app instance methods like someapp.focus(), someapp.close(), etc. on the individual browser windows rather than chrome as a whole.
Is such a thing possible? I have tried the following but it always get the 'no viable alternative at...' error message:

chrome_app = App('Chrome') # Create app instance for chrome
browser1_app = App(chrome_app.getWindow()) # Create an app instance out of the currently focused window of chrome
# something to bring another browser window into focus
browser2_app = App(chrome_app.getWindow()) # This is where it starts throwing the 'no viable alternative at...' error

Thanks in advance

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-01-24
Last reply:
2018-01-24
RaiMan (raimund-hocke) said : #1

--- 'no viable alternative at...' error message
this a Python syntax error, that might have its cause in the statement before the mentioned statement.
Just try to understand, what the message tells you.
Usually something syntactically needed is missing.

Can you help with this problem?

Provide an answer of your own, or ask Shekhar for more information if necessary.

To post a message you must log in.