Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) ActivateText(windowName string, objectName string) error
- func (c *Client) ActivateWindow(windowName string) error
- func (c *Client) CaptureScreen(filename string) error
- func (c *Client) CaptureSized(filename string, size Size) error
- func (c *Client) CaptureWindow(filename, windowName string) error
- func (c *Client) Click(windowName, objectName string) error
- func (c *Client) EnterString(windowName, objectName string, data string) (out bool, err error)
- func (c *Client) GUIExists(windowName string) (out bool, err error)
- func (c *Client) GUIObjectExists(windowName, objectName string) (out bool, err error)
- func (c *Client) GUITimeout(guiTimeout int) (out bool, err error)
- func (c *Client) GenerateKeyEvent(characters string) error
- func (c *Client) GenerateMouseEvent(x, y int, eventType string) error
- func (c *Client) GetAllStates(windowName, objectName string) (out map[string]bool, err error)
- func (c *Client) GetAppList() (res []string, err error)
- func (c *Client) GetChild(windowName, componentName, role string) (res []string, err error)
- func (c *Client) GetObjectInfo(windowName, objectName string) (res []string, err error)
- func (c *Client) GetObjectList(windowName string) (res []string, err error)
- func (c *Client) GetObjectProperties(windowName, objectName string) (map[string]interface{}, error)
- func (c *Client) GetObjectProperty(windowName, objectName, propertyName string) (value interface{}, err error)
- func (c *Client) GetObjectSize(windowName, objectName string) (*Size, error)
- func (c *Client) GetTextValue(windowName, objectName string, startOffset, endOffset int) (value string, err error)
- func (c *Client) GetWindowList() (res []string, err error)
- func (c *Client) GetWindowSize(windowName string) (*Size, error)
- func (c *Client) KeyPress(code string) error
- func (c *Client) LaunchApp(appname string, args ...string) (out bool, err error)
- func (c *Client) MouseLeftClick(windowName, objectName string) error
- func (c *Client) MouseMove(windowName, objectName string) error
- func (c *Client) MouseRightClick(windowName, objectName string) error
- func (c *Client) ObjTimeout(objTimeout int) (out bool, err error)
- func (c *Client) WaitUntilGUIExists(windowName, objectName string, timeout int) (out bool, err error)
- func (c *Client) WaitUntilGUIInState(windowName, objectName string, timeout int, state LDTPState) (out bool, err error)
- type LDTPState
- type Size
Constants ¶
This section is empty.
Variables ¶
var StateActive = LDTPState("active")
var StateAnimated = LDTPState("animated")
var StateArmed = LDTPState("armed")
var StateBusy = LDTPState("busy")
var StateChecked = LDTPState("checked")
var StateCollapsed = LDTPState("collapsed")
var StateDefunct = LDTPState("defunct")
var StateEditable = LDTPState("editable")
var StateEnabled = LDTPState("enabled")
var StateExpandable = LDTPState("expandable")
var StateExpanded = LDTPState("expanded")
var StateFocusable = LDTPState("focusable")
var StateFocused = LDTPState("focused")
var StateHasTooltip = LDTPState("has_tooltip")
var StateHorizontal = LDTPState("horizontal")
var StateIconified = LDTPState("iconified")
var StateIndeterminate = LDTPState("indeterminate")
var StateInvalid = LDTPState("invalid")
var StateInvalidEntry = LDTPState("invalid_entry")
var StateIsDefault = LDTPState("is_default")
var StateLastDefined = LDTPState("last_defined")
var StateManagesDescendants = LDTPState("manages_descendants")
var StateModal = LDTPState("modal")
var StateMultiLine = LDTPState("multi_line")
var StateMultiselectable = LDTPState("multiselectable")
var StateOpaque = LDTPState("opaque")
var StatePressed = LDTPState("pressed")
var StateRequired = LDTPState("required")
var StateResizable = LDTPState("resizable")
var StateSelectable = LDTPState("selectable")
var StateSelectableText = LDTPState("selectable_text")
var StateSelected = LDTPState("selected")
var StateSensitive = LDTPState("sensitive")
var StateShowing = LDTPState("showing")
var StateSingleLine = LDTPState("single_line")
var StateStale = LDTPState("stale")
var StateSupportsAutocompletion = LDTPState("supports_autocompletion")
var StateTransient = LDTPState("transient")
var StateVertical = LDTPState("vertical")
var StateVisible = LDTPState("visible")
var StateVisited = LDTPState("visited")
var Statetruncated = LDTPState("truncated")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the interface to the LDTP server, on which you can make all future calls.
func (*Client) ActivateText ¶
ActivateText activates the text in an object.
func (*Client) ActivateWindow ¶
Activate window (bring it to front)
func (*Client) CaptureScreen ¶
CaptureScreen takes a full screen capture (calls imagecapture).
func (*Client) CaptureSized ¶
CaptureSized takes a full screen capture (calls imagecapture).
func (*Client) CaptureWindow ¶
CaptureWindow takes a screen capture of a single window (calls imagecapture).
func (*Client) EnterString ¶
EnterString sends a string of data in an object.
func (*Client) GUIObjectExists ¶
GUIObjectExists returns whether the objectName exists. This replaces the `ldtp` `objectexist` call.
func (*Client) GUITimeout ¶
GUITimeout sets the global timeout for windows, in seconds.
func (*Client) GenerateKeyEvent ¶
GenerateKeyEvent sends a series of characters as key events.
func (*Client) GenerateMouseEvent ¶
GenerateMouseEvent does a mouse action at a given screen position.
The eventType can be: "abs" to jump to an absolute position, "rel" to move relatively to previous position, "b1p" to press left button, "b1r" to release left button, "b1c" to click left button, "b1d" to double-click left button. A similar pattern goes with "b2p", "b2r", "b2c" and "b2d" for the middle button, and b3[prcd] for the right button.
func (*Client) GetAllStates ¶
GetAllStates retrieves the states for a given object (ex: focusable, showing, visible, selectable, enabled, sensitive, horizontal, vertical, etc...)
func (*Client) GetAppList ¶
GetAppList retrieves the list of accessibility application windows open.
func (*Client) GetChild ¶
GetChild gets the list of child objects available in the window, by matching componentName or role, or both (if non-empty string).
func (*Client) GetObjectInfo ¶
GetObjectInfo retrieves infos on objects for a given Window name.
func (*Client) GetObjectList ¶
GetObjectList retrieves the list of available objects on a window.
func (*Client) GetObjectProperties ¶
GetObjectProperties is a shorthand to retrieve all the properties. If you care about speed, use GetObjectProperty instead.
func (*Client) GetObjectProperty ¶
func (c *Client) GetObjectProperty(windowName, objectName, propertyName string) (value interface{}, err error)
GetObjectProperty retrieves a property of an object. Must be a property that exists as returned by `GetObjectInfo`.
func (*Client) GetObjectSize ¶
GetObjectSize retrieves a Size object representing the width, height and position of a widget.
func (*Client) GetTextValue ¶
func (c *Client) GetTextValue(windowName, objectName string, startOffset, endOffset int) (value string, err error)
GetTextValue retrieves the text displayed for an object. Specify -1 for `startOffset` and `endOffset` for default values.
func (*Client) GetWindowList ¶
GetWindowList retrieves the list of windows, frames and panels.
func (*Client) GetWindowSize ¶
GetWindowSize retrieves the size of a window, and returns a Size.
func (*Client) MouseLeftClick ¶
MouseLeftClick clicks the left mouse button in the middle of the specified object.
func (*Client) MouseRightClick ¶
MouseRightClick clicks the right mouse button in the middle of the specified object.
func (*Client) ObjTimeout ¶
ObjTimeout sets the global timeout for objects, in seconds.