cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistent Application Behavior though used Global Send Key

DebashisGhosh1
Level 4
Hi Team,

We have one web base application where we need to perform below action:
1. Need to place one outbound call from the application by pressing one calling button.
2.There is one INPUT box where we have to write the contact no to place the call.
3. After providing the input as contact no in the input box we have to press the "Call" button. The call button has two characteristics :
            a. If the input contact no is written correctly and then press the call button - it will place the call correctly.
            b. If the input contact no is NOT written correctly and then press the call button - it will open the phone search directory which is not part of the automation scope and not the desire part.

Problem Statement: Sometimes it's writing the contact no in the input box and placing the call correctly sometimes it's not.
Note : The application is only Spyable in Browser mode and we have to access the application via Chrome browser only.

Solution Tried
:
1st Method : Normal "Write" stage used to write and press the Call Button (Via pressing [Tab] and then [Enter] Button)
Result: Inconsistent behavior. Sometime it's successful sometimes it's failing.

2nd Method: Used Navigate Stage to pass Global Send key where we did [Activate Window + Focus + Click Center+ Global Send Keys (Passing text) + Again Click (To activate the Calling Button)] then in the next "Navigate" Stage we are passing {Tab} and {Enter} to place the call.

Note: For each individual action we have placed 1 Sec wait time.

Result
:Inconsistent behavior. Out of 5 runs it's 2 times success and 3 times fails.

Question: Is there any other though or suggestion to mitigate this issue ?  Please let us know.
BP Version : 6.6

Thanks for all your support in advance.

------------------------------
Debashis Ghosh
------------------------------
Debashis Ghosh
8 REPLIES 8

VivekGoel
Level 10
Suggestions:

Method1: Assuming your issue occurs after entering the data and while pressing the call button. After entering the data, can you check if call button exists, if it exists, send a click center.

Method 2: Give some time gap between  {Tab} and {Enter}.


------------------------------
Vivek Goel
"If you like this post, please press the "Recommend" Button.
------------------------------

lookman
Staff
Staff
Hi Debashis.

If the mod suggested by Vivek is not successful, I suggest you look at using Global Send Key Events.  

Send Key Events will work for all applications; it is a lower-level interface that mimics keyboard keystrokes in the operating system.

 Unlike other interfaces where a write stage will populate an element with text even when that element is not visible, there are some factors that need to be in place for Global Send Key interfaces to work robustly:

  • The desktop screen must exist and be persistent. Send Key interfaces will not work if the desktop screen is locked or a screensaver is displayed 
  • The window that you want to send text into must be activated to be the topmost window of all running applications 
  • The element within the window you want to send text into must be focused so that the keyboard cursor is within it ready to enter text 
  • To ensure the application has time to react to any window or element focus navigation tiny delays are required between window activates, element clicks, and using Send Keys 
  • To ensure text is entered reliable a tiny delay should be placed between each keystroke. Experience in the use of Send Keys interfaces has shown that for some applications entering text too quickly can result in some characters not being correctly entered


------------------------------
Jack Look
------------------------------

AmiBarrett
Level 12
It's possible that the SendKeys events are too fast for the application to handle, specifically within the single step that passes your text/number to the application. Have you tried storing the data to the clipboard, then replacing the SendKeys step with "^v" to paste?

------------------------------
Ami Barrett
Sr Product Consultant
Blue Prism
Plano, TX
------------------------------

Swetha__Devaram
Level 4
As Ami suggested, try using Clipboard actions. I faced similar situation with an application and used clipboard actions. 1) Clear Clipboard 2) Set Clipboard and 3) Paste by using Send Key Events "<{CTRL}V>{CTRL}".

------------------------------
Swetha Devaram
RPA Developer
Health Markets
America/Chicago
------------------------------

Thanks Jack for your suggestion. We will check and let you know

------------------------------
Debashis Ghosh
------------------------------
Debashis Ghosh

Thanks Ami for your suggestion.
We will check and let you know

------------------------------
Debashis Ghosh
------------------------------
Debashis Ghosh

Thanks Swetha for more clarification.
We will check and let you know

------------------------------
Debashis Ghosh
------------------------------
Debashis Ghosh

I agree with Swetha that the set to clipboard and then paste option is a good technique to try. I would suggest adding 'Clear Clipboard' to the end of those steps as "4)" just to ensure that the phone number is sanitized from the clipboard. I'm not sure the purpose of Clearing the Clipboard beforehand since built into Setting the Clipboard, it already erases what was there before. Nothing wrong with including Clear Clipboard at the beginning of course, but be sure to include it at the end as well.

------------------------------
Dave Morris
3Ci @ Southern Company
Atlanta, GA
------------------------------

Dave Morris, 3Ci at Southern Company