Down arrow key in Synthetics

Hi ,
Could you please let me know how to use down arrow key in Synthetics(scripted browser) ?
I am trying to select a value after typing the value(not a dropdown/combo box).

Tried this,$browser.findElement($“object”)).keyDown(Key.ARROW_DOWN); and it dint work.

Hi @Harish.Raj: The function you are looking for is sendKeys. Your function becomes:


1 Like

Hi Stefan,
Thanks for your reply,i did try this yesterday but I got ‘ReferenceError: Keys is not defined’ error.
I did define $browser.actions(); in the script but did not work.

The Keys are a property of the webdriver so you need to use:



Hi Stefan,
Surprisingly down arrow button isnt working but Key.ENTER seems to work. Still no luck with the item selection from the list.(Auto complete list).

Can you confirm that the script runs correctly but is not selecting the item in the list?

You may need to click or clear the element prior to calling sendKeys.

Hi Stefan,
Yes the script works fine.Its doing the below steps,
1)Click on the edit box
2)Type the object name in the edit box (Autocomplete list)
3)Item appears in the dropdown but i am unable to select the element and the only way to select the element is to clickon the item appearing in the dropdown list.
Pressing ENTER button does not work.

Hi Stefan,
This is resolved now. Used firebug to locate the element from the dropdown list and simple click worked. Thanks a lot for your help.

I am glad you resolved your issue @Harish.Raj. For those that are also experiencing this type of problem there is a sample script to select items from a dropdown list.

i need help here , how did you do it? i am struggling here