My application has a print document option that opens the pdf reader.

Is there a way to check if the pdf reader is running from Katalon?

  • 1
    Not sure why someone has voted to close as it's primarily opinion based... where's the opinion here? Is there a way to check if the .pdf reader is running from Katalon Studio or not? It sounds pretty black and white to me.
    – dvniel
    May 25, 2018 at 11:10

1 Answer 1


What about checking if the process is running by using a CustomKeyword ?

In your Keyword:

boolean processIsRunning(String processName) {

    def sout = new StringBuilder(), serr = new StringBuilder()
    def cmd = 'tasklist /FI "IMAGENAME eq ' + processName + '"'
    def proc = cmd.execute()
    proc.consumeProcessOutput(sout, serr)

    if(sout.indexOf(processName) < 0)
        return false;
        return true;

In your TestCase (Script mode):

boolean process = CustomKeywords.'main.CheckProcess.processIsRunning'('explorer.exe')

if (process)
   KeywordUtil.markPassed("Process is running")
   KeywordUtil.markFailed("Process not running, test failed")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.