LDTP
3.5.0
|
getcursorposition('<window name>', '<text object name>')
Gets the current cursor position of the given text object
cursor | position which is of type long on success, LdtpExecutionError exception on failure |
Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/text.py
from ldtp import *
settextvalue('*-gedit', 'txt0', 'Testing setcursorposition function of LDTP')
getcursorposition('*-gedit', 'txt0')
The above example will get the current cursor position in the text object of gedit windows first tab.