[1.1.4] how to use the App.open() when i use

Asked by wu on 2019-05-23

i use sikuli 1.1.4 and now i already open the chrome and it is the new page and i run my code in sikuli
my code:
 chrome = App(r'my app')
chrome.open()

the sikuli will use the already open chrome and will not open a new chrome to use
but in the 1.1.3 the code will can use and open the new chrome ,is 1.1.4 open app method have change?
or that is normal situation

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
TestMechanic
Solved:
2019-05-29
Last query:
2019-05-29
Last reply:
2019-05-27
RaiMan (raimund-hocke) said : #1

yes, that is correct:
someapp.open() just focuses on an already running instance.

But why do you want to have 2 chrome instances running?

wu (chouhua) said : #2

thx RaiMan because sometime my chrome will open my website and if use auto that will be not to contorl
like 1.1.3 it will open evert time the new chrome so i will not to config something to do because it will a new page
but in 1.1.4 if my chorme now is open something important and it will maybe to use my important page so have so idea can like the 1.1.3 to open the app use new app

Best TestMechanic (ndinev) said : #3

Wu,

I can suggest 2 approaches:

### approach1:

type('r', KeyModifier.WIN)
sleep(1)
type('chrome')
type(Key.ENETR)

### approach2:

import os
os.system('start chrome')

wu (chouhua) said : #4

Thanks TestMechanic, that solved my question.