How to select a date from datePicker?

I am trying to read a date form a excel file and fill a web form which have a date picker. In that the date cannot be directly typed into the field. It can be only selected from the calendar.
Could someone give a solution for this problem please?

Thanks.

@Lakshan_Waruna
Convert your date in Date Picker format and then make Adjustment In selectors to take proper Month and date in It.

thanks for the tip. Can you explain the process making adjustments in selectors part a bit more.

@Lakshan_Waruna
Just try to add your date Value In the selector as Aaname and try to make selector as dynamic by adding the Variables in the selector editor. You can also use UiExplorer to check Multiple selectors to check the differences so you can adjust according to it.

Hi @Lakshan_Waruna

Sorry for my late reply. I have being stuck with some personal matters and wasn’t able to reply on time.

Well if the site does not allow for the date to be typed in, basically we need to click on the date we need. This may require multiple clicks depending on the month and the date we need the record to be on.

You might first need to come up with a logic like this.
Basically when it expands it shows the current month calendar. So your first condition should be

  1. Which month the date picker shows by default.
  2. Next which month you need the date to be clicked on.
  3. If it’s a different month, come up with a way to navigate to the required month of the date
  4. Then a click on the required date.

So it all depends on selectors.both for the month and the day. I dont have a laptop with me so I’m unable to find you a good selector for this what you can do is, use the UI Explorer to find a good selector which you can make dynamic.

So try inspecting couple of month based selectors and do the same for the day and find a ui element tag of the selector which holds the value you need to click.

Then through the ui Explorer itself, hard code the value you need and click on verify with highlight option on to see whether it picks up the correct element.

Next, when adding this to your workflow, introduce variables for the hard coded part to make the selector dynamic… :slight_smile:

1 Like