Newbie - First intro test fails on the second step

The following test instruction…

WebUI.click(findTestObject(‘Page_CURA Healthcare Service/a_Make Appointment’))

….from the Introduction…

https://docs.katalon.com/katalon-studio/tutorials/introduction-to-web-testing.html#get-ready

…fails…

02-28-2019 04:03:26 PM click(findTestObject(“Page_CURA Healthcare Service/a_Make Appointment”))

Elapsed time: 0.797s

click(findTestObject(“Page_CURA Healthcare Service/a_Make Appointment”)) FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object (Root cause: java.lang.IllegalArgumentException: Object is null)
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)
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$0.call(Unknown Source)
at ASPNet360SiteTestCase01.run(ASPNet360SiteTestCase01:17)
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:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1551369794850.run(TempTestCase1551369794850.groovy:22)

….anyone got any ideas?

Many thanks in advance,

Keith.

In my experience this means that the path “Page_CURA Healthcare Service/a_Make Appointment” in findTestObject(“Page_CURA Healthcare Service/a_Make Appointment”) is incorrect, hence, the object is not found in the Object Repository.

I guess you have this code:

WebUI.openBrowser('https://katalon-demo-cura.herokuapp.com/')
WebUI.click(findTestObject('Page_CURA Healthcare Service/a_Make Appointment'))

Please change this a bit as follows and try again:

WebUI.openBrowser('https://katalon-demo-cura.herokuapp.com/')
WebUI.verifyElementPresent(findTestObject('Page_CURA Healthcare Service/a_Make Appointment'), 10)
WebUI.click(findTestObject('Page_CURA Healthcare Service/a_Make Appointment'))

Hi @kazurayam
Thanks for the reply
tried your suggestion…didn’t work either
My question is, how do I see where the object “Page_CURA Healthcare Service/a_Make Appointment” is detailed on the webpage, all I see is this regarding the button…

…or should the test be trying to reference “btn-make-appointment” in some way?
i.e.
WebUI.click(findTestObject(‘btn-make-appointment’)) …{which I’ve just tried and doesn’t work either!}

Thanks for the reply @Harold_Owen
How do I view what is in the website/web page’s Object Repository?
Looking at the page in the developer view in Google, this is what I see regarding the button…

strangle that Katalon’s own first test case example in their intro tutorial doesn’t work on their test website/page!?

Hello , i tried to reproduce your error.
It seems that your code is correct but you dont have the object added in the object repository: a_Make Appointment . the object should be in page called : Page_CURA Healthcare Service (this should be a folder name in object repository section within katalon studio project).
Try to create new folder in object repository called: Page_CURA Healthcare Service . Once created, right-click and create new Test object. Call the object: a_Make Appointment . Inside the object
click on xpath selection method radiobutton and paste this xpath: //*[@id=“btn-make-appointment”] .
Then try to run your test again

Keith,

Please find the attached screenshot.

This screenshot shows how the “Page_CURA Healthcare Service/a_Make Appointment” Test Object looks like in the sample project on my mac. Do you have a similar Test Object on your side?