LDTP  3.5.0
 All Pages
hasstate

Syntax

hasstate('<window name>', '<object name>', <object SPI state>[, <guitimeout>])

Description

Checks the SPI state of the given object.

Return values
1on success, 0 on failure

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

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

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

Example

With respect to gedit window, first tab

from ldtp import *

hasstate('*-gedit', 'txt0', state.FOCUSABLE)

Wait for FOCUSABLE state till 10 seconds to be enabled

hasstate('*-gedit', 'txt0', state.FOCUSABLE, 10)

Author
Nagappan Alagappan nagap.nosp@m.pan@.nosp@m.gmail.nosp@m..com


Linux Desktop Testing Project