cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove prefilled text and enter actual data in a text field

NiteshMishra
Level 3
Hi Team, I am using a HTML application, wherein I need to fill up some data, but when I am trying to supply data using BP "WRITE" stage , it just overwrite the data which is not solving my purpose. I want to click the field so that it erase the pre-filled data and input the desired value. Please see attached two screeshots Expected & Actual to understand the issue and suggest workaround. Note : I know that we can use "NAVIGATE" stage to click first and then using "WRITE" stage my purpose will be solved, but I want to use only "WRITE" stage and solve the issue.  
4 REPLIES 4

HarshalJhingran
Level 4
As seen in image, the text is been written in foreground not in backhand so for this Spy the elements using AA mode and use focus or Global Mouse click to activate the text box and then try global send keys to write the text.

John__Carter
Staff
Staff
Application UIs are built expecting a human user with a keyboard and sometimes you have to use global send keys and clicks to make BP act more humanlike. Once the cursor is in the field you can use a GSK such as {HOME}{DELETE 20} to erase any content before sending your input.

NiteshMishra
Level 3
Hello Team, many thanks for your quick help, actually I was under impression that we could use ""WRITE"" stage itself to erase the content and then supply the actual data. I have 15 similar fields, If I could supply GSK in the ""WRITE"" stage itself it would ease my jobs, else using 2-3 stages for each fields could lead to a lengthy process. Hope it clarifies my question. I have worked on other automation toll wherein I can enter GSK with the actual input itself or max by using the sage twice.(once for clearing and then entering desired data)

DhruvinPatel
Level 3
I follow an different approach for such scenarios. I use ""CTRL+A"" after focusing that field. That way you don't need to worry about the length of string in that box. Sequence of steps that I follow. 1) Attach to window. 2) Activate it.(required for send keys). 3) Focus the field you want to update. 3) Use ""^A^""(CTRL+A) for selecting pre-filled text. 4) Use write stage.   Hope that helps.