0

I'm working in sikuli-1.1.1,python. I need to automate a code to open a website. So, I have to open chrome and type the link in a tab with sikuli. As for now I'm using this code to open chrome,

 app = App("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")
 app.open()

but I don't want to open a new instance(window) every time.How to check whether the application is already running or not?.

Prabakar
  • 174
  • 2
  • 4
  • 14

1 Answers1

1

To answer your question directly - yes, you can do it like this (I only have Sikuli running in Java but that method should be available via the API):

print app.isRunning()

that should give you true or false response.

Having said that, you should consider adding some setup/cleanup functionality that will prepare a fresh environment before each test and clean it up after a test is finished. This will reduce the number of false positives and is the right thing to do.

Eugene S
  • 6,709
  • 8
  • 57
  • 91
  • It worked. isRunning() is available for sikuli ver-1.1+ it seems. find more on:http://sikulix-2014.readthedocs.io/en/latest/appclass.html – Prabakar Feb 06 '18 at 07:47