Date picker Web Testing

My script cant seem to handle my date picker, i keep getting the same error, im new to katalon so if anyone could help would be much appreciated, ive looked at some posts but all seem to lead me to writing javascript, is there anyway around this or does the code need to be changed ?

com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/New employee/Page_CIPHR Self Service 9.0.3/a_1’ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: ‘Object Repository/New employee/Page_CIPHR Self Service 9.0.3/a_1’ located by ‘By.xpath: //div[@id=‘05378500-202e-4bfb-99e0-52786c54e4ab’]/table/tbody/tr/td[6]/a’ not found)
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.execute(ClickKeyword.groovy:67)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$ Source)
at New employee - employee - HR:63)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(
at com.kms.katalon.core.main.TestCaseExecutor.runScript(
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(
at com.kms.katalon.core.main.TestCaseExecutor.execute(
at com.kms.katalon.core.main.TestCaseMain.runTestCase(
at com.kms.katalon.core.main.TestCaseMain.runTestCase(
at com.kms.katalon.core.main.TestCaseMain$runTestCase$ Source)

1 Like

The error is saying the xpath above does not work.

I’m guessing that id is dynamic (changes each time the page is executed). You might try modifying the xpath to not use the id.


Thanks for getting back to me Russ - Ill take on board your help and look into it :slight_smile:


For what it’s worth, I was successful using the following JavaScript command to set a date in my datepicker field, since the Click command was not working.

Execute JavaScript | | document.getElementById(“edit-sales-funnel-widget-field-graduation-month-and-year-und-0-value-date”).value = “08/2017”;

My date field is just mm/yyyy, but you could adjust this to fit your date format. Hope this helps.


Yea ive seen that answer a lot, if I cant get it working with changing the xpath then I will just result to javascript command - Thanks Jeff