anyone plz tell me I want to select date 1 before 2 month ago then also select today’s date
can u tell me how can i do it?
Did you first try with type into or set text? set text can work in these cases
if not try this
cheers
check this reference
The below video will help you out one picking dates from the date picket.
Hope it helps!!
Is your query how to click on the two date’s or it’s about how to calculate?
Thanks,
Ashok
calender shows cureent date 12-6-2024 then i want to select 2 month ago date like 1-4-2024 after that select current date
then date should be
(previous 2 month ago date) 1-4-2024 - 12-6-2024(current date)
If you can type this range instead of clicking on the date range then
Use this in Assign activity like this.
strDateRange = Now.AddMonths(-2).ToString("dd-M-yyyy")+" - "+Now.ToString("dd-M-yyyy")
Use this strDateRange
while using Type Into activity.
If typing the range is not option then follow the solutions provided by others.
Thanks,
Ashok
If you are unable to write date with type into activity using variable then try using click activity
Click backward Arrow two time as you want two months back so it will be hardcoded.
After two clicks
- Make variable for two month previous
- Date1=DateTime.Now.AddDays(-60).ToString(“dd”)
- use click activity → go to uiexplorer → Pass Date1 variable as in “aaname” it will click the date of two month before , since the year is current and month is already select with two backward arrow, yo can easily select date.
design same scenerio for current date also if required.
but if type into activity works then i recommend you to try that approach first thanks.
Hammad Rafiq Tukdi
Type into activity will not work here because
We can’t type date only we can select date
Ok Then Try My Second Solution It will work definitely
i dont understand if it is accepted then whats the issue?
Please add a log message below assign activity to check what the exact output is coming.
For previous 2 month date first change the month from June to April and then use the click activity to pick a date and pass the Assign variable in its selector.
Hope it helps!!
If you pass the variable the selector it will not validate but if the value is correct it will successfully complete the task.
I want to select current date from calender but when i pass variable in click activity it shows error
means without validate it will work
Yess it will work.
First get the from date as your 2 month ago date by changing the month and then pick the date by using click activity.
Then get the current date by changing the month to June and pick the date using click activity passing the date variable in it
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.