tags:

views:

74

answers:

1

Hi,

I am working on selenium for automation web application testing.

I want make a key stroke event while entering the values in the textfield

I tried the following

@browser.type(auto_complete_field_locator, auto_complete_field_value)
@browser.type_keys(auto_complete_field_locator, auto_complete_field_value)

and it worked in the Internet Explorer 8 browser but it does not work in the Firefox.

@browser.type_keys(auto_complete_field_locator, auto_complete_field_value)

The type_keys method escapes the last character while entering value in to the text field.

Thanks

+1  A: 

Try typing the string by each character's keycode:

@browser.type_keys(auto_complete_field_locator, "\119")

Here you can find the rest of the JavaScript keycodes.

Santi