cancel
Showing results for 
Search instead for 
Did you mean: 

ADDING 2 NUMBERS IN WINDOWS CALC USING COLLECTION

SuhasM
Level 3
I am trying to interact with windows calculator, I have spied the calculator app. I have fetched the data from a excel worksheet as a collection. Now i am writing the data into the calculator application. When I am trying to write the values into the calculator from the collection i am getting an error saying   

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

Please do let me know how to resolve this issue.

Thank you
Suhas

------------------------------
Suhas M
------------------------------
11 REPLIES 11

KodiSrihari
Level 8
Hi @Suhas M ,

Could you re check the spied fields where you want to write values by identifying them.  ​

Thanks,

------------------------------
Srihari
RPA Developer
------------------------------

ManpreetKaur1
Level 8
Hi @SuhasM,

Instead of writing value using Write stage, did you try using 'Click' action using Navigate stage to perform the calculations. Suppose you want to perform 3*4 = 12 action, please follow the below steps:

1) Spy all the buttons e.g. 3,4,=,1,2,* etc.
2) Use 'Navigate' stage to perform Global Mouse click center ​to click button 3
3) Similarly use the Navigate stages for performing other actions and it should work.

Hope it helps in resolving your query

------------------------------
Manpreet Kaur
Manager
Deloitte
------------------------------

Hi Manpreet, the solution you have given makes the program static which makes it difficult if we want to calculate for n number of values. I am trying to achieve a dynamic method where in values are being fetched from an excel and written into the calculator application.

------------------------------
Suhas M
------------------------------

Hi Srihari , Yes I reidentified the fields but still I am facing the issue.

------------------------------
Suhas M
------------------------------

PabloSarabia
Level 11
Hi @SuhasM

Just a simple question... why are you using the Windows Calculator instead of performing this with a Calculation Stage?

If you only want to performe calculations is more efficient to make this with out any external app I guess



See you in the community, bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

Hi @SuhasM,

You can use 'Dynamic' property of the spied elements in order to make your solution dynamic. Attaching a snippet for your reference

32174.png
I have created a logic using Choice stage to pass the values as dynamic in ​UIA Name attribute ( I spied using UIA mode)
32175.png
Post that, using Calculation stage. setting the output in 'Value' variable

32176.png

32177.png
Hope it helps in resolving your query.

------------------------------
Manpreet Kaur
Manager
Deloitte
------------------------------

Hi Pablo, We are new to this technology and we are doing several tasks just to get used to this tech. Interacting with an windows application[calculator] was one among the several tasks we were performing hence we are using the windows calculator.


Thank you
Suhas

------------------------------
Suhas M
------------------------------

Hi @SuhasM

If is only an exercise, is perfect for practice as you said.

Just a simple tip for you in the future, when you want to create a robot you have two ways to perform this. First one is replicate the same steps as a human, this become in an inefficient processes. Or try to go beyond thinking the best way to make the task.

This is why I ask you why are you using the calculator 😄


Enjoy your RPA journey!

See you in the community, bye 🙂

------------------------------
Pablo Sarabia
Architect
Altamira Assets Management
Madrid
------------------------------

Hi Manpreet Kaur, your solution worked and it helped us a lot in solving the problem.



Thanks
Suhas

------------------------------
Suhas M
------------------------------