How to automate DatePicker

Hey all
I am trying to automate the datepicker for check in and check out date
Can someone help me with it

I have tried playing with selectors of click activity but i was not able to click on dates of next year or next 2 months ,
Can someone help me with it
The website link is

Hi @Goku

The booking site allow to type the date in the check in and check out dates. If yes, then better to use the Type into activity then we can give the data directly to it. No need to use date picker and selectors.

Hope it helps!!

@mkankatala , It does not give an option to type into the field
Its purely based on clicking

Kindly refer the website for more information


Check this

First prefer type into or set text…if not follow the logic above


Okay @Goku

Can you show the selectors how it appears when indicating the element in the date picker.
I am not able to access the website.

Hi @Goku

strMonthyear=DateTime.ParseExact(stroutput,“dd/mm/yyyy”,system.Globalization.CultureInfo.InvariantCulture).tostring(“MMMM yyyy”)

outside the While use click activity to cluck on the date
pass the below variable in the selector of click activity

strday=Date.ParseExact(stroutput, “dd.MM.yyyy”, System.Globalization.CultureInfo.InvariantCulture).Day

try this once

@Goku ,

  1. Use a while loop and keep the condition as true

  2. Add check app state and select a the month(Element to appear)
    Edit its selector , here i used a strict selector
    Below is the selector that i use
    <webctrl tag='H3' aaname='{{checkinMonthAndYear}}' />

checkinMonthAndYear contains “November 2024”

  1. In the target ap[pear and not appear section
    Add click activities
    Below is the screenshot for your reference

The left side click activity will select the date and its anchor is the month and year name

the right side click activity will navigate to next page

If target appears and clicks on the date then it will break from the while loop

Kindly play with selectors of click activity

Hope it helps you out!

1 Like

Thank you @Vikas_M @Anil_G

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.