Method: Selenium::Client::GeneratedDriver#set_cursor_position

Defined in:
lib/selenium/client/legacy_driver.rb

#set_cursor_position(locator, position) ⇒ Object

Moves the text cursor to the specified position in the given input element or textarea. This method will fail if the specified element isn’t an input element or textarea.

‘locator’ is an element locator pointing to an input element or textarea ‘position’ is the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field.



1247
1248
1249
# File 'lib/selenium/client/legacy_driver.rb', line 1247

def set_cursor_position(locator,position)
    remote_control_command("setCursorPosition", [locator,position,])
end