Outsystems numeric datefield field doesn't set number

I have the following element from Outsystems, which is a Date mask component.

<input data-input="" class="form-control OSFillParent" type="text" placeholder="dd-mm-jjjj" aria-required="false" aria-describedby="b4-Input_Birthdate_DescribedBy" value="dd-mm-jjjj" id="b4-Input_Birthdate" inputmode="numeric">

which looks like this

I have used the following script, I have also used sendText.


WebUI.sendKeys(findTestObject('WebPortaalPatient/inp-geboortedatum'), '0101950')

I just want to add a birthdate to it from a Global variable. However it cannot for some reason enter the numbers, though it says it has done it:

I have tried changing the Global variable to a number and tried to directly put a number in the field in the formats ‘01011950’ and ‘01-01-1950’

Has anyone has some experience with this component from Outsystems?

1 Like

Assuming your locator is correct (How to manually create XPath locators based on HTML tags using Chrome) see these links:

1st wait for the element.

2nd use enhanced click.

3rd use set text.

OR use send key in place of set text.

I have a doubt about the value you typed in:

This could be formated into 01-01-950. This string does not look valid against to the suggested format “dd-mm-jjjj” which wants 4 j but you gave 950 which is 3 j.

I have a doubt about inputmode="numeric".

The Date format depends on the locale of end users, so that it is problematic. For example in a country a date string could be written like “2023/10/29”, which does not look to be a “numeric” value. inputmode="text" will be adaptive.

Why not you try to change your Application Under Test so that it outputs inputmode="text"?

The 0101950 was a typing error, but I would expect that it would still enter this in the field.

The whole goal of the field is that users have a numeric keyboard on their mobile device and on the website they can only enter numbers.
The application is only for users in the Netherlands and with the outsystems solution it automatically makes the right date format.

Is there an explanation why Katalon cannot enter the numbers?

I have no idea.

In the end I have tried the combination Enahnced click with Send keys and this works! Thank you for the suggestions.