cancel
Showing results for 
Search instead for 
Did you mean: 

Java Application automation - Date picker

SamLima
Level 7
Any suggestions on how to automate date picker?

32971.png


------------------------------
Sam Lima
------------------------------
1 BEST ANSWER

Helpful Answers

Hi @SamLima

Also, out of curiosity I did automate the date picker approach as well for your knowledge using the Java mode 🙂 You can see below is the sample workflow for that.

Sample Workflow:

32926.png
Steps To Follow:

Step-I) So, here I am taking a date value as an input along with the window title. I call the 'Attach' page and then check if the Win32 element which surrounds my application exists or not.​​​ If it does I use a multi calculation stage to break down the values of the date into individual components of day, month and year as shown below:

32927.png

Step-II) So now once, I have got the values first I click on the date picker button as shown below:

32928.png
Step-III) Now, I select the month name from the dropdown with the help of 'Month' data item as shown below:


32929.png

Step-IV) After that, I select the year field as shown below:


32930.png
 For the year field, I select all the text starting from first character till 4th as I know year will always have 4 characters in total. Once text is selected I delete them all using "BACKSPACE" key, then I set the value of 'Year' data item and then press "TAB" key to activate the element

Step-V) Then I click on the day field which has a dynamic parameter for "VirtualName" attribute where I pass in the value of 'Day' data item as shown below:

32931.png
Step-VI) Lastly, I check the date field to validate if the value that got set is equal to my input date parameter or not:

32932.png
Though setting up the text value directly can be a faster approach but yes if you want to properly validate each step and make sure you don't input anything incorrect this definitely you can follow as well.


------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

View answer in original post

6 REPLIES 6

PabloSarabia
Level 11
Hi @SamLima

Usually, when you have a date picker (even in a java app or in a web app​) you can type directly the date that you want without selection in the frame.

First you need is to know the format date (e.i. month / day / year...) and then format and type in the control.

Try it!


See you in the Community, bye 🙂

------------------------------
Pablo Sarabia
Solution Manager & Architect
Altamira Assets Management
Madrid
------------------------------

Hi Sam,

For this application, if you are using Java spying mode after installing Java Access Bridge driver on your machine then the following attributes should identify your element:

32904.png
32905.png

Simply use a Writer stage here and pass the date in "dd/MM/yyyy" format:

32906.png

I would recommend you to use Java Mode as UIA mode is bit unreliable in this application at times I have seen in past.

Steps For Enabling Java Mode:

If you can't see the Java mode on your Blue Prism, then follow the below steps:

1) Download the Java 8 SDK from Oracle website for 32 bit : JAVA SE 8  and then install it on your machine.

NOTE: You would need to register an Oracle account in order to download it.

32907.png
NOTE: I am downloading 32 bit since Blue Prism expects a 32 dll driver for JAB.


2) Now, install the Java Access Bridge (2.0.1) from here: JAB 2.0.1 and then install it on your machine.

32908.png

NOTE: JAB 2.0.2 has some bugs so do not install that


3) Once you have installed both of them, Go to Control Panel -> Ease Of Access Center -> Make It Easer To Focus On Task and check the Enable Java Access Bridge option

32909.png

4) Now, copy the WindowsAccessBridge-32.dll file from: C:\Program Files (x86)\Java\jdk1.8.0_202\jre\bin to your Blue Prism installation folder:

32910.png
5) Now when you create a new business object, choose the Java Automation option in the Application Modeler inside your Blue Prism, give all the input parameters such as the file path of your application and you should be able to see Java Mode while spying:


32911.png

6) Spy elements using Java Mode for this application:

32913.png
------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi @PabloSarabia,
yes I tried this way, I format the date to be valid, bu I was curious about trying date picker​

thank you

------------------------------
Sam Lima
------------------------------

Thank you Devneet


------------------------------
Sam Lima
------------------------------

Hi @SamLima

Also, out of curiosity I did automate the date picker approach as well for your knowledge using the Java mode 🙂 You can see below is the sample workflow for that.

Sample Workflow:

32926.png
Steps To Follow:

Step-I) So, here I am taking a date value as an input along with the window title. I call the 'Attach' page and then check if the Win32 element which surrounds my application exists or not.​​​ If it does I use a multi calculation stage to break down the values of the date into individual components of day, month and year as shown below:

32927.png

Step-II) So now once, I have got the values first I click on the date picker button as shown below:

32928.png
Step-III) Now, I select the month name from the dropdown with the help of 'Month' data item as shown below:


32929.png

Step-IV) After that, I select the year field as shown below:


32930.png
 For the year field, I select all the text starting from first character till 4th as I know year will always have 4 characters in total. Once text is selected I delete them all using "BACKSPACE" key, then I set the value of 'Year' data item and then press "TAB" key to activate the element

Step-V) Then I click on the day field which has a dynamic parameter for "VirtualName" attribute where I pass in the value of 'Day' data item as shown below:

32931.png
Step-VI) Lastly, I check the date field to validate if the value that got set is equal to my input date parameter or not:

32932.png
Though setting up the text value directly can be a faster approach but yes if you want to properly validate each step and make sure you don't input anything incorrect this definitely you can follow as well.


------------------------------
----------------------------------
Hope it helps you out and if my solution resolves your query, then please mark it as the 'Best Answer' so that the others members in the community having similar problem statement can track the answer easily in future

Regards,
Devneet Mohanty
Intelligent Process Automation Consultant | Sr. Consultant - Automation Developer,
WonderBotz India Pvt. Ltd.
Blue Prism Community MVP | Blue Prism 7x Certified Professional
Website: https://devneet.github.io/
Email: devneetmohanty07@gmail.com

----------------------------------
------------------------------
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

Hi @devneetmohanty07

before posting this thread I tried automating this date picker I did it right for year field and month field but still had issues with picking day, but your way is a masterpiece, Thank You so much Dev!

------------------------------
Sam Lima
------------------------------