Jeby
Jeby

Reputation: 83

How can I simulate Tab Key and Enter Key press, using JavaScript for TruClient

I am working on LR Truclient, which uses JavaScript as underlying language. I have a scenario, where I need to click 'Tab' key and then 'Enter' key (to change the focus to browser pop button, which I am not able to handle with default steps available in Truclient), where I have to write the code in JavaScript to achieve the same. Can some one help with a piece of code in JS, to achieve the same?

Upvotes: 0

Views: 422

Answers (1)

JaxCoq
JaxCoq

Reputation: 28

Have you tried to send the "tab" using the built-in steps? You need to add a "Generic Object Action" and then configure as follows:

Define the generic action as a key press: Step: Press Key

Configure the key press to be a tab: Argument: Tab key

You might need to "press" tab several times to land in the correct button. You can use the same technique to press "Enter".

Upvotes: 1

Related Questions