Question

4
Replies
31
Views
Close popover
Stephen Stone (StephenS9927)
Anthem Inc

Anthem Inc
US
StephenS9927 Member since 2019 7 posts
Anthem Inc
Posted: November 5, 2020
Last activity: November 5, 2020
Solved

Robotics: How to simulate pressing the enter key on a website

I am automating functionality within a webpage launched in Internet Explorer (required) which is made up of several forms with several rows/columns within each form.  There is a default amount of rows which show up in each form and is capped at 12.  However, when the user clicks on a text box within the last row and presses the enter key, a new row will appear.  

Now let's say I need to enter data for 15 rows.  I need to add three more rows.  However, I am really struggling to find a way to simulate the user pressing the enter key.  

I've looked at RaiseEvent options (onkeydown, onkeyup) but there doesn't appear to be a way of passing an argument to tell the website which key has been pressed.  This is important as the function in the .js is specifically looking for event.keyCode == 13.  

I don't see any other way of adding the new rows I need without the user pressing the enter key.

I've tried extracting the function code to create a customized function but it isn't working.  There are too many undefined function exceptions being thrown for functions not within the .js file.  I'm not sure where to find them either.

Any help you can provide will be greatly appreciated.

Pega Robotic Desktop Automation 8.0 Robotic Process Automation Healthcare and Life Sciences Robotics System Architect