cancel
Showing results for 
Search instead for 
Did you mean: 

How to pick dates from calendar to apply leaves

SwatiAgrawal
Level 5
Hi Everyone,

I want to apply leaves by clicking on calendar button and selecting dates. Pls suggest how to do this? I am not able to select. 
I was creating the bot by using "navigate". But it gives error that way. Its not working with below bot.
21567.png

21568.png


21569.png





------------------------------
SWA
------------------------------
1 BEST ANSWER

Best Answers

BramhaniM
Level 3
Hello,

1) please check if the Date field allows writing or pasting of the value. 
  • If it allows, then try Write or Navigate stage (Global send keys) to do it.
2) If the above method doesn't work, then
  • First, check if you can spy elements(dates) within the calendar window. 
                  * If elements are recognizable then you can use dynamic elements method to pick the right date in the calendar window.
                  * But you have to code waits and clicks appropriately to actually open the calendar window in the first place

  • But if elements are not recognized within the calendar window, 
                   *you might have to explore other ways like surface automation or trying to use Javascript etc.
Hope this helps.

------------------------------
Bramhani M
Consultant
CAPCO
Indian/Mahe
------------------------------

View answer in original post

4 REPLIES 4

AndreKöpplin
Level 5
Hello Swati 

Which spying methode you used? Which error message you received? Are you able to identified the elements in Application Modeller?

Maybe you have to use another spying methode instead of HTML, check if you can use AA. Do you able to enter the Date into the Date Fields instead to click on the date?

BR
Andre

------------------------------
Andre Köpplin
RPA Project Manager
Europe/Wroclaw
------------------------------

BramhaniM
Level 3
Hello,

1) please check if the Date field allows writing or pasting of the value. 
  • If it allows, then try Write or Navigate stage (Global send keys) to do it.
2) If the above method doesn't work, then
  • First, check if you can spy elements(dates) within the calendar window. 
                  * If elements are recognizable then you can use dynamic elements method to pick the right date in the calendar window.
                  * But you have to code waits and clicks appropriately to actually open the calendar window in the first place

  • But if elements are not recognized within the calendar window, 
                   *you might have to explore other ways like surface automation or trying to use Javascript etc.
Hope this helps.

------------------------------
Bramhani M
Consultant
CAPCO
Indian/Mahe
------------------------------

Hi Andre,

In Application modeller, I used UI Automation method to spy the elements. Now this time I did not open calendar. Instead I spied each and every element (From DD, From MM, From YYYY). I have pasted the screenshot of the elements I spied below. Also pasting the screenshot of bot I created. In the bot, I am calculating current date and trying to write in the "From Date" box in screenshot 1. However, when I write, then it gives me below mentioned error.
Could you please help here.


"Internal : Failed to perform step 1 in Write Stage 'Input' on page 'Input leave data' - Unable to find a valid pattern - required: ValuePattern"


21555.png

21556.png


21557.png


------------------------------
Swati Agrawal
------------------------------

Hi Swati,

The error message indicates "ValuePattern".
I believe you have already tried writing the full date in the required pattern DD/MM/YYYY and it didn't work?

For existing code:

Maybe try inducing some delay and write DD, MM & YYYY in individual Write stages because I am thinking once you enter DD that's when "/" gets activated and similarly, once you enter MM the second "/" gets activated

or
you can do the entire thing in one Navigate stage using Global Send Keys along with Delay as well.

All the best!





------------------------------
Bramhani M
Consultant
CAPCO
Indian/Mahe
------------------------------