LDTP  3.5.0
 All Pages
gettextvalue

Syntax

gettextvalue('<window name>', '<component name>', <startoffset>, <endoffset>)

Description

returns the text within the given range in the component given by the component name. <startoffset> and <endoffset> are optional. If they are ommited, the entire text is returned.

Return values
textdata of string type on success, LdtpExecutionError exception on failure

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

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

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

Example

With respect to gnome search tool structure

gettextvalue('SearchforFiles', 'txtNameContainsEntry')

The above statement will return the text present in 'txtNameContainsEntry' field.

gettextvalue('SearchforFiles', 'txtNameContainsEntry', 5)

The above statement will return the text present in 'txtNameContainsEntry' field starting from the fifth character.

gettextvalue('SearchforFiles', 'txtNameContainsEntry', 5, 10)

The above statement will return the text present in 'txtNameContainsEntry' field starting from the fifth character

till the tenth character.

Author
Premkumar J prem..nosp@m.joth.nosp@m.imani.nosp@m.@gma.nosp@m.il.co.nosp@m.m


Linux Desktop Testing Project