Issue with double click activity

Hi I had an requirement where i need to select a date(date-time picker widget) from excel sheet
i have read the data from excel sheet and stored in a assign variable
like var = “July 20, 2020”
and my span tag looks like
span class=“flatpickr-day " aria-label=“July 27, 2020” tabindex=”-1">27</span
in double click event i have tried
find by -> Manual -> and selecting “var” variable in which i have store the data which i need to click


it is throwing "Web element not found error "

and when i tried manually instead of passing var it is working fine.

Hi,

passing variable in manual selector will not work. Kindly try Java script approach to achieve your use case

Regards,
Amit Anand

Hi Amit

Can you please guide me to select a Dynamic date from date picker i.e just need to click on the particular date value that’s it .

Hi,

Try getting the value from an argument and setting it directly in date time text box

Regards,
Amit Anand

Hi Amit

Actually its a read only text box so we cannot set the values directly

let me say clearly my requirement is
image

As attached above we have a date picker and i am able to pass the values to hours and minutes since they are normal text box but i am facing issue while selecting the date

i am not able perform click on date’s as mentioned above i tried to perform click by manually passing an argument value to span class but its throwing error

can you please guide me on how to select a date passed by user.

Hi,

Once this calendar comes use java script to select your desired date

Regards,
Amit Anand

Hi ,

I have tried using query-selector with the help of aria-label in span tag and replaced class name with flatpickr-day-selected as mentioned below is the span tag
"span class=“flatpickr-day " aria-label=“July 27, 2020” tabindex=”-1">27</span"
to
"span class=“flatpickr-day-selected " aria-label=“July 27, 2020” tabindex=”-1">27</span"

i am able to select the desired date i needed but the selected date is not getting reflected in the text box value please find the image below

the default date selected was 22nd and with query-selector i have changed to 24th but still date in the text box remains 22nd itself

image

and here goes the code i have done

to select date 24 
var element = document.querySelector('[aria-label="July 24, 2020"]');
element.class = "flatpickr-day-selected"

sort of like this and 24th date is getting highlighted and  changing color to red but still value in text box is not getting changed.

Hi,

Perform click operation post that

Regards,
Amit Anand

Hi

I have even done that and that does not work

var element = document.querySelector(’[aria-label=“August 2, 2020”]’);
element.setAttribute(‘class’, ‘flatpickr-day selected’)
element.click()

And still no luck amit.