Documentation
¶
Index ¶
- type AXElementData
- type Action
- type ControlInterface
- func (a ControlInterface) EnableSelectionMode()
- func (a ControlInterface) GetElement(ctx context.Context) (AXElementData, error)
- func (a ControlInterface) Move(ctx context.Context, direction MoveDirection) (AXElementData, error)
- func (a *ControlInterface) PerformAction(actionName Action, currentPlatformElementValue string) error
- func (a ControlInterface) ResetToDefaultAccessibilitySettings() error
- func (a ControlInterface) SwitchToDevice()
- func (a ControlInterface) TurnOff()
- func (a ControlInterface) UpdateAccessibilitySetting(name string, val interface{})
- type MoveDirection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AXElementData ¶ added in v1.0.183
type AXElementData struct {
PlatformElementValue string `json:"platformElementValue"` // Base64-encoded platform element data
SpokenDescription string `json:"spokenDescription"` // Spoken description of the element
}
AXElementData represents the data returned from Move operations
type ControlInterface ¶
type ControlInterface struct {
// contains filtered or unexported fields
}
ControlInterface provides a simple interface to controlling the AX service on the device It only needs the global dtx channel as all AX methods are invoked on it.
func New ¶
func New(device ios.DeviceEntry) (ControlInterface, error)
New creates and connects to the given device, a new ControlInterface instance
func NewWithoutEventChangeListeners ¶ added in v1.0.171
func NewWithoutEventChangeListeners(device ios.DeviceEntry) (ControlInterface, error)
NewWithoutEventChangeListeners creates and connects to the given device, a new ControlInterface instance without setting accessibility event change listeners to avoid keeping constant connection.
func (ControlInterface) EnableSelectionMode ¶
func (a ControlInterface) EnableSelectionMode()
EnableSelectionMode enables the UI element selection mode on the device, it is the same as clicking the little crosshair in AX Inspector
func (ControlInterface) GetElement ¶
func (a ControlInterface) GetElement(ctx context.Context) (AXElementData, error)
GetElement moves the green selection rectangle one element further
func (ControlInterface) Move ¶ added in v1.0.183
func (a ControlInterface) Move(ctx context.Context, direction MoveDirection) (AXElementData, error)
Move navigates focus using the given direction and returns selected element data.
func (*ControlInterface) PerformAction ¶ added in v1.0.183
func (a *ControlInterface) PerformAction(actionName Action, currentPlatformElementValue string) error
performAction performs the standard accessibility action without alert checking
func (ControlInterface) ResetToDefaultAccessibilitySettings ¶ added in v1.0.171
func (a ControlInterface) ResetToDefaultAccessibilitySettings() error
func (ControlInterface) SwitchToDevice ¶
func (a ControlInterface) SwitchToDevice()
SwitchToDevice is the same as switching to the Device in AX inspector. After running this, notifications and events should be received.
func (ControlInterface) UpdateAccessibilitySetting ¶ added in v1.0.122
func (a ControlInterface) UpdateAccessibilitySetting(name string, val interface{})
type MoveDirection ¶ added in v1.0.183
type MoveDirection int32
Direction represents navigation direction values used by AX service
const ( DirectionPrevious MoveDirection = 3 DirectionNext MoveDirection = 4 DirectionFirst MoveDirection = 5 DirectionLast MoveDirection = 6 )