cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to update data in webportal input box

Venkata_Sreedha
Level 4
hi All, I have a web application which has few input boxes to enter data in. These input boxes might already have data in it, in which case, I need to clear off the existing data and update the new data in those boxes. The problem I am facing is, when I use a write stage to enter the new data, it is overriding the existing data which is what I wanted but when I tried to save the data, the data is not saved. I know that some portals do not recognize the data entered using write stage so I tried to use "Global Send Keys" to send write data into the input box. Below is the approach I tried - 1) Activate the application (after spying it using Win32 mode). 2) Put cursor in the input box using "Click Center" option in navigate stage (I spyed the input box using HTML mode). 3) Use "Global Send Keys" in Navigate stage to enter the data in the input box. I am facing couple of issues in this scenario - I am able to activate the application but the "Click Center" option is not working for some reason. I am not seeing the cursor in the box where I sent "Click Center" action so the "Global Send Keys" stage is writing data in another input box (which is selected by default) which is not what I intended. I assumed the issue might be because of using HTML spyed input box being used in "Click Center" so I tried to spy the input box using AA mode but I am not able to find the unique combination of attributes that can identify the input box I wanted using AA mode. In this scenario, can someone help me with the approach to be followed. 1) Do I need to spy the input box (in which I want to enter the data in) using AA mode only to use "Click Center" option or wil lHTML mode also work. If HTML mode works, what mistake am I doing in this case? 2) How do I clear off the data which is existing in the input box before using "Global Send Keys" to update the input box with new data. One approach to clear off existing data in the input box is to send "Backspace" after putting cursor in that box but I am not sure if I use "Click Center" option if the cursor will be placed at the end of the data in the box or in the middle of the data. If the cursor is placed in the middle, even after sending "Backspace" the entire data might not be cleared. Highly appreciate any help how I need to approach this situation. Attached the screen shot of the web portal and the input boxes I am referring to.
2 REPLIES 2

John__Carter
Staff
Staff
Try the Focus action using your HTML element. {HOME}{DELETE 25} is usually a reliable Send Keys to clear a field once the cursor is in place.  

Anonymous
Not applicable
An option that worked for me is a write stage to write an empty value (so to clear the value) Then an navigate to first focus and then send keys (interval is 1 sec in my case)