Trying to find date time dynamically

@Anil_G
image

i am trying to get year month and day dynamically.

how to achieve this?

uiexplorer window

i clicked on January and it is taking like this in ineertext

@Rakesh_Tiwari

You want to read or select the required date

If select check this

Cheers

i want to read it from input and select it from date picker.

but when i try to implement it using selector i didnot find selector for all (like day month year).

@Rakesh_Tiwari

From ui explorer …right top you will see options…switch to active accessibility and check

Cheers

yes, pls see this


it is generating when i click on month, but when i click on day it is not generating these selectors.
innertext generating , but how to change date and read it from input

image

now see this selector

@Rakesh_Tiwari

The selectors looks like it is for whole picker …

Can you check if there is a selector for date…

Or is there a way you can type int he date…

Can you please gice the site that you are trying

Cheers

https://futureofworkblog.web.app/challenge2021.html

@Anil_G

this is the website, pls check and get me the code

You can try “Set Text” activity on the Date field and use DateTime.Now.ToString(“MMM dd, yyyy”)

@Rakesh_Tiwari

Selector for date is directly available

<html app='chrome.exe' title='RPA in Practice 2020 Challange' /> <webctrl tag='TABLE' /> <webctrl tableRow='2' tag='BUTTON' innertext='1' />

Similarly if you click on month and year youa re getting drop downs can select from them

cheers

@Rakesh_Tiwari

You can watch the below video. If you inspect on the day in the date picker you will able to find an attribute which give the day value. Need to make it dynamic by passing the variable.

Hi @Anil_G ,
below is the selector for month

and this way date is coming from input file - 2002-07-24

as you said i need to perform three click activity, and will pass like in innerrext- in_transactionitem(“colname”).tostring
so that it will take it right?

@Rakesh_Tiwari

You have to extract month date and year separately from date and pass them separately for each one…and for month…you have to first click on the top menu…then on the drop down click on the month

Datime.ParseExact(yourdate,"yyyy-MM-dd",system.Globalization.cultureinfo.invariantculture).Tostring("MMMM") this will give month similarly yyyy inside .Tostring and dd will give year and date respectively

Cheers

image


replaced the selector with variable
this selector also changed with variable
image

but it is not clicking on datepicker only

@Rakesh_Tiwari

Please use the below selector with set text activity

<html app='chrome.exe' title='RPA in Practice 2020 Challange' />
<webctrl tag='INPUT' type='text' class='datepicker' />

Datime.ParseExact(yourdate,"yyyy-MM-dd",system.Globalization.cultureinfo.invariantculture).Tostring("MMM dd, yyyy")

Please mark the solution if solved else happy to help

cheers