LDTP  3.5.0
 All Pages
enterstring

Syntax

enterstring('<window name>', '<object name>', '<data>')

Description

Functionality of enterstring is similar to typekey of LTFX project. Main difference is this function works based on accessibility. So, we could specify the window name, object name and finally the data string.

Return values
Returns1 on success, LdtpExecutionError exception will be thrown on failure

Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/keypress_actions.py

Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/keypress_actions.py

Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Text.cs

Example

enterstring('*-gedit', 'txt0', 'Testing LDTP\'s enterstring function')

This function supports

<alt> - for alt key

<ctrl> - for control key

<shift> - for pressing shift key

<enter> - for pressing enter key

<tab> - for pressing tab key

<del> - for pressing del key

<bksp> - for pressing back space key

<f1> - for pressing F1 function key

...

<f12> - for pressing F1 function key

<up> - for pressing up arrow key

<down> - for pressing down arrow key

<right> - for pressing right arrow key

<left> - for pressing left arrow key

<esc> - for pressing escape key

<space> - for pressing space bar

<home> - for pressing home key

<end> - for pressing end key

<pageup> - for pressing page up key

<pagedown> - for pressing page down key

<prtscrn> - for pressing print screen key

Author
Prashanth Mohan prash.nosp@m.moha.nosp@m.n@gma.nosp@m.il.c.nosp@m.om


Linux Desktop Testing Project