Can't set value date picker

Hi,

I’m having problems giving value to a field type kendo-datepicker.
I read the values ​​from an excel file where I have date fields with the following format:


I have tried sending the value using sendKeys and setText and always get the same result. The value is correctly sent to the field, but it only shows well the year:
image
Can you help me? Thanks!

I assume the date you want is 14/02/YYYY (February 14). Can I suggest you change the semi-colon you have in the formula to a comma, like: =TEXT(TODAY(),"DDMMYYYY") or =TEXT(NOW(),"ddMMyyyy"). What I don’t know is if the formula will upset your entry into KS but you can respond back what happens.

Unless you are using the Julian calendar and want the 142nd day of the year?

The excel format does not allow me to use the comma, I have to put a semicolon.

I have tried to put the formula as you indicate, with NOW(), but it continues to show only the value of the year in the field.
In the console I see that the value of the date is sent correctly.


This is the field I want to fill in. I access it with the xpath and in KS I send the value with SendKeys
image

What happens if you manually enter the date, 15/02/2022? Does it stay in the field?

Yes, whether I manually type the date or do a copy - paste

What happens if you create a date in code and try to set it? Does that work? Is the concern about getting the date from Excel? Just trying to determine where the fail is coming from.

def myDate = "15/02/2022"
WebUI.setText(findTestObject('myDateObject'), myDate)

WebUI.verifyElementAttributeValue(findTestObject('myDateObject'), "value", myDate, 10)

I have tried what you mention and it gives an error when executing:

INFO: ++++++++++++++++++ CAMPO FECHA: Fecha de factura:
feb 22, 2022 7:59:28 AM java_util_logging_Logger$log$1 call
INFO: +++++++++++++++++ VALOR FECHA: 12022022
2022-02-22 07:59:30.937 ERROR c.k.k.core.keyword.internal.KeywordMain - :x: Object ‘Object Repository/Repositorio_5.0/objetosFormulario/objetoTextoCombo’ has attribute ‘value’ with actual value ‘d/M/2022’ instead of expected value ‘15022022’ (Root cause: com.kms.katalon.core.exception.StepFailedException: Object ‘Object Repository/Repositorio_5.0/objetosFormulario/objetoTextoCombo’ has attribute ‘value’ with actual value ‘d/M/2022’ instead of expected value ‘15022022’
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:64)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementAttributeValueKeyword$_verifyElementAttributeValue_closure1.doCall(VerifyElementAttributeValueKeyword.groovy:94)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementAttributeValueKeyword$_verifyElementAttributeValue_closure1.call(VerifyElementAttributeValueKeyword.groovy)
at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:20)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementAttributeValueKeyword.verifyElementAttributeValue(VerifyElementAttributeValueKeyword.groovy:109)
at com.kms.katalon.core.webui.keyword.builtin.VerifyElementAttributeValueKeyword.execute(VerifyElementAttributeValueKeyword.groovy:70)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:74)
at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.verifyElementAttributeValue(WebUiBuiltInKeywords.groovy:4338)

Could it be some property of the date control? I’m going to talk to the developer who has programmed the page to see if he can help me.

Hi!
Finally I solved it by simulating the pressing of each number of the date.

(Date in spanish format)
WebUI.sendKeys(findTestObject(myDateObject, Keys.chord(Keys.NUMPAD2 + Keys.NUMPAD5 + Keys.NUMPAD0+ Keys.NUMPAD3+ Keys.NUMPAD2+ Keys.NUMPAD0+ Keys.NUMPAD2+ Keys.NUMPAD2))

Maybe it can be useful to someone