Logo Search packages:      
Sourcecode: ldtp-doc version File versions  Download package

getcursorposition

Syntax

getcursorposition ('<window name>', '<text object name>')

Description

Gets the current cursor position of the given text object

Implementation

Todo:
Return values:
cursor position which is of type long on success, LdtpExecutionError exception on failure
Refer: http://webcvs.freedesktop.org/ldtp/ldtp/src/text.c

Example

from ldtp import *

# Assuming that gedit is opened

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.

Author:
Nagappan <nagappan@gmail.com>

Generated by  Doxygen 1.6.0   Back to index