Scheduling Katalon job does not work in Windows!

Hi,

We have created a project in Katalon, and set up a batch script to run it in commandline. It works properly when it is run in the windows command line. But when we schedule it in Task scheduler, it does not work fully. It starts the execution, but fails in the middle.

Could you please let us know what could be the possible reasons for the issue.

The command we are using to run is:

D:\Utilities\Web_Performance\Katalon_Studio_Windows_64-6.2.0\katalon.exe -noSplash  -runMode=console -consoleLog -projectPath="D:\Utilities\Web_Performance\Katalon_workspace\performance_monitoring\monitoring.prj" -retry=0 -testSuitePath="Test Suites/WebPerformanceTS" -executionProfile="default" -browserType="IE" -apiKey=xxx

Snippet of error message is as follows:

Reason:

com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/WebPerformance_OR/Page_IXIASOFT CCMS - cpi/button_Measuring Web Performance_asgv-edit-writer-yra1560408626870’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:26)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)
at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:56)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:616)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$5.call(Unknown Source)
at VerifyTopicClickable.run(VerifyTopicClickable:19)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:337)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:307)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:299)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:233)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:133)
at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:116)
at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:83)
at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
at TempTestSuite1569587153249.run(TempTestSuite1569587153249.groovy:35)
Caused by: com.kms.katalon.core.webui.exception.WebElementNotFoundException

Thanks in advance.

Regards,
Shabeer

hi,
is it browser opened properly?
“Unable to click on object ‘Object”
or maybe you have to add some delays between object click
waitFor…

Hi,

Thank you for the response!

When the script is run separately in command prompt, it works completely. But when it is scheduled in Task scheduler and tries to run, it executes partially only. Seeing the Reports, we see that it is able to open the browser and able to login to the url we provided, but it fails after that. We have already kept a delay time of 1 minute and still it is not working.

Also in the reports we see some reference images as a black screen.

Do you have any clue what could be going wrong here?

Regards,
Shabeer

Hi,

One more thing. The scheduled task is running when I try to run it from task scheduler (right click-> Run) with option “Run only when user is logged on” . But when I try to run it with the option “Run whether user is logged or not” option, this issue happens. Any clue?

Regards,
Shabeer

I am also having the same issue. Test Suite runs fine in console mode without task scheduler in chrome and IE using a batch file. But when triggered from task scheduler, it fails in IE with this message -“unable to find the element located by ‘By.xpath: //*[@name = ‘username’]’. Please recheck the objects properties to make sure the desired”
And i get black screen screenshots in the reports. I’ve tried setting delays, wait till the element is present, visible, recommended IE settings and still same issue.
Did you find a solution for it?

My batch file code:
@echo off
“C:\Program Files\Katalon_Studio_Windows_64-6.3.3\katalon.exe” -noSplash -runMode=console -testSuiteCollectionPath=“Test Suites\SuiteCollectionIE” -projectPath=“C:\projects\KatalonTests\KatalonTests.prj” -apiKey= -consoleLog