i am trying to get year month and day dynamically.
how to achieve this?
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).
From ui explorer …right top you will see options…switch to active accessibility and check
Cheers
yes, pls see this
now see this selector
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
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”)
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
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?
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
but it is not clicking on datepicker only
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
To pick dymamic date from datepicker.
If you select the exact date, you will not get a proper selector with month and year. In this case, you won’t be able to make the date value dynamic in the selector.
You should increase the scope of the container and select the bigger box. Now, you will get a selector with complete date value with month and year.
In the selector, you can make the date value dynamic by providing a variable for it.
Use attribute = ‘{{variable name}}’