Hi All
I get “Unable to click on object 'Object Repository/…” error when I run the job from jenkins in cmd mode.
the same command line code works manually from a cmd prompt.
Could you please help me on why I get he object not found error when I run from jenkins?
hello,
try to remove white spaces from the Object Repository path
@ Timo_Kuisma2
Hi Timo
Below is the actual error i see in the jenkins console.
com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/Page_XXX/select_Rounding’
I have underscores in the name of the objects in the object repository paths. Where exactly do you want me to remove the white spaces?
Please let me know
Thanks
ok, path is fine, add some delay before clicking object
Timo_Kuisma2
This is still not working after adding time delay. it works fine if i run from katalon UI or from cmd line.
doesnot work only in jenkins job
I have executed Jenkins job In Linux RedHat and in Windows 10 machines, no issues
Can we see the test execution in the remote machine when it is running in command line or can we record it to know exactly where the issue is?
@ Timo_Kuisma2
Below is my jenkins job config
cd C:\Users\XXXXX\Documents\XXXXX
git pull https://bitbucket.XXXXX.com/scm/xxx/xxxxxx.git
C:\Users\xxxxx\Documents\Katalon_Studio_Windows_64-6.3.3
katalon -noSplash -runMode=console -projectPath=“C:\Users\xxxxx\Documents\xxxxxx\xxxxxx\xxxxx.prj” -retry=0 -testSuitePath=“Test Suites/CucumberBDDTestSuite” -executionProfile=“default” -browserType=“Chrome”
echo Success
this is way how i have defined Jenkins job
cd C:\Users\xxx\KatalonStudio\Katalon_Studio_Windows_64-7.0.0
katalon -noSplash -runMode=console -reportFolder="%WORKSPACE%/Reports"
-projectPath="%WORKSPACE%\KatalonProject.prj" -retry=0 -testSuiteCollectionPath=“Test Suites/RegressionTestSuiteCollection”
-browserType=“Chrome (headless)”
-apikey=xxxxxxxxxxx
if ERRORLEVEL 1 set ERRORLEVEL=0
let Jenkins handle git job, remove this
“git pull https://bitbucket.XXXXX.com/scm/xxx/xxxxxx.git ”
and use Jenkins Source Code Management
Ibus
October 17, 2019, 5:58am
10
deva.madhusudhan:
-browserType=“Chrome”
try with -browserType=“Chrome (headless)”
@Ibus
@Timo_Kuisma2
Hi All, I was able to resolve this issue. Issue was browser was not opening in max window and I had to add scrollToElement to work with the elements.
Thanks for your help
@deva.madhusudhan Your approach should also work but if you try this then you wouldn’t need to scrollToElement
WebUI.setViewPortSize(1360, 978)
I think you are using WebUI.maximizeWindow() in your script, WebUI.maximizeWindow() will maximize the Window according to the screen resolution set for your linux/ jenkins server.
@manpreet.mukkar
Thank you. Your suggestion worked for me.