How can I search THE "app" bethwen same app´s

Asked by Geruza

First, sorry but my English is not "the best" .. rsrsrs But I will Try!

I have 2 Firefox opened and I need open a specific one. How can I make this?

switchApp get a title from App in this case "Mozila Firefox" but the ttwo app´s have the same title.

Tanks

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Geruza
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

I found, that with Windows it works, to use any partial text of the window title to get the window to front.

So in your case, if the to windows have some text in the title, that differs, switchApp() should work. If both windows have exactly the same title, I guess, there is no easy way.

If you have a chance to identify the window by using find(<image>), you can switchApp(Firefox) and test the window content. If its not the right window, just use a key combo to switch to the next Firefox window and test again (if its only 2, this now should be the right one).

Hope it helps.

Revision history for this message
Geruza (geruzalira) said :
#2

Yeap!

My solution:

while not find(<picture from a title> ):
      type(Key.TAB, KEY_SHIFT + KEY_ALT)

Tanks :)

Revision history for this message
RaiMan (raimund-hocke) said :
#3

pls. change satus to solved above.

Revision history for this message
Geruza (geruzalira) said :
#4

Ok. Sorry