Start recording session and try to enter date into the date input
Expected: To record a step to 'Enter Text' Actual: A 'Click' step gets recorded and no date entered is registered in the test.
Workaround:
Navigate to the page where is the date picker - I used this sample.
Add the date input field into the test elements (the Elements Explorer) - for this you can either use the recorded click step, or highlight the element and choose to add it to the element repository.
Once the element is into the project, you can add steps for it from the Step Builder - that includes the 'Enter text' action as well (from the Quick Actions section).
Type the date you want to enter without using the slashes - for example 1072022 for today's date.
Execute this step - you can use the partial test run options to execute only that step. Check what happens upon execution. Note: The Enter text step consists of few actions one after the other - these include a click action, which is being sent by default in the absolute center of the input field. Depending on the date picker implementation that could bring some inconsistency when entering the date - for example the month doesn't get changed at all. Actually if you manually click in the center of the input (even if this is not that precise) and enter the date, you will see the same behavior. If you click over the month, though, in the left part of the input you can then enter the date correctly. If this is the case, you will need the adjustments described in the next steps. These will actually change the click action so that it clicks on the left side of the input.
The 'Enter text' step needs to be converted to code in order to modify the properties of the click action. When the step is edited in code you can see the MouseClick() method is the default one and doesn't use any parameters. You can directly choose any of the methods overloads and specify a click point in the input field.
If you are not proficient in code writing and need some assistance to identify the right method to specify the location, you can use the following approach - while recording add a mouse click step through the Advanced Recording tools and choose the option to click on specific point from the target element.
Once you have that step, you can convert it to code - that way you can see the MouseClick() method and what attributes it uses to click on a specific point. You can copy that line of code and replace the click action in the 'Enter text' step sequence.
Then, remove or uncheck from the test the help mouse click step used to sort out the code.