Documentation
¶
Index ¶
- func MustSwipe(x1, y1, x2, y2 int)
- type Node
- func (node *Node) Bounds() (left, top, right, bottom int)
- func (node *Node) Class() string
- func (node *Node) Click() error
- func (node Node) DoubleClick() error
- func (node *Node) ElementIsCheckable() bool
- func (node *Node) ElementIsChecked() bool
- func (node *Node) ElementIsClickable() bool
- func (node *Node) ElementIsEnabled() bool
- func (node *Node) ElementIsFocusable() bool
- func (node *Node) ElementIsFocused() bool
- func (node *Node) ElementIsLongClickable() bool
- func (node *Node) ElementIsPassword() bool
- func (node *Node) ElementIsScrollable() bool
- func (node *Node) ElementIsSelected() bool
- func (node *Node) ElementIsVisibleBasedOnContentDesc(content string, timeout int) bool
- func (node *Node) ElementIsVisibleBasedOnID(resourceId string, timeout int) bool
- func (node *Node) ElementIsVisibleBasedOnText(text string, timeout int) bool
- func (node *Node) FindElementByClass(className string) (*Node, error)
- func (node *Node) FindElementByContentDesc(contentDesc string) (*Node, error)
- func (node *Node) FindElementById(resourceId string) (*Node, error)
- func (node *Node) FindElementByText(text string) (*Node, error)
- func (node *Node) Index() string
- func (node *Node) InsertText(text string) error
- func (node *Node) IsCheckable() bool
- func (node *Node) IsChecked() bool
- func (node *Node) IsClickable() bool
- func (node *Node) IsEnabled() bool
- func (node *Node) IsFocusable() bool
- func (node *Node) IsFocused() bool
- func (node *Node) IsLongClickable() bool
- func (node *Node) IsPassword() bool
- func (node *Node) IsScrollable() bool
- func (node *Node) IsSelected() bool
- func (node *Node) LongClick(timeout int) error
- func (node *Node) MustClick()
- func (node *Node) MustDoubleClick()
- func (node *Node) MustGetElementByClass(className string) *Node
- func (node *Node) MustGetElementByContentDesc(contentDesc string) *Node
- func (node *Node) MustGetElementById(resourceId string) *Node
- func (node *Node) MustGetElementByText(text string) *Node
- func (node *Node) MustInsertText(text string)
- func (node *Node) MustLongClick(timeout int)
- func (node *Node) Package() string
- func (node *Node) ResourceID() string
- func (node Node) Swipe(x1, y1, x2, y2 int) error
- func (node *Node) Text() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Node ¶
type Node struct { XMLName xml.Name Attributes []xml.Attr `xml:",any,attr"` Children []Node `xml:",any"` Content string `xml:",chardata"` }
Node represents a generic XML node
func MustGetPage ¶
func MustGetPage() *Node
MustGetPage function to get the root node of the XML and panic if not found.
func OpenChrome ¶
OpenChrome opens the Chrome browser on the device.
func (Node) DoubleClick ¶
DoubleClick function to double click on an element.
func (*Node) ElementIsCheckable ¶
ElementIsCheckable function to check if an element is checkable based on its ID.
func (*Node) ElementIsChecked ¶
ElementIsChecked function to check if an element is checked.
func (*Node) ElementIsClickable ¶
ElementIsClickable function to check if an element is clickable.
func (*Node) ElementIsEnabled ¶
ElementIsEnabled function to check if an element is enabled.
func (*Node) ElementIsFocusable ¶
ElementIsFocusable function to check if an element is focusable.
func (*Node) ElementIsFocused ¶
ElementIsFocused function to check if an element is focused.
func (*Node) ElementIsLongClickable ¶
ElementIsLongClickable function to check if an element is long clickable.
func (*Node) ElementIsPassword ¶
ElementIsPassword function to check if an element is a password field.
func (*Node) ElementIsScrollable ¶
ElementIsScrollable function to check if an element is scrollable.
func (*Node) ElementIsSelected ¶
ElementIsSelected function to check if an element is selected.
func (*Node) ElementIsVisibleBasedOnContentDesc ¶
ElementIsVisibleBasedOnContent function to check if an element is visible based on its content Desc.
func (*Node) ElementIsVisibleBasedOnID ¶
ElementIsVisibleBasedOnID function to check if an element is visible based on its ID.
func (*Node) ElementIsVisibleBasedOnText ¶
ElementIsVisibleBasedOnText function to check if an element is visible based on its text.
func (*Node) FindElementByClass ¶
FindElementByClass function to find an element by class.
func (*Node) FindElementByContentDesc ¶
FindElementByContentDesc function to find an element by content-desc.
func (*Node) FindElementById ¶
FindElementById function to find an element by id.
func (*Node) FindElementByText ¶
FindElementByText function to find an element by text.
func (*Node) InsertText ¶
InsertText function to insert text into an element.
func (*Node) IsCheckable ¶
IsCheckable function to check if an element is checkable.
func (*Node) IsClickable ¶
IsClickable function to check if an element is clickable.
func (*Node) IsFocusable ¶
IsFocusable function to check if an element is focusable.
func (*Node) IsLongClickable ¶
IsLongClickable function to check if an element is long clickable.
func (*Node) IsPassword ¶
IsPassword function to check if an element is a password field.
func (*Node) IsScrollable ¶
IsScrollable function to check if an element is scrollable.
func (*Node) IsSelected ¶
IsSelected function to check if an element is selected.
func (*Node) MustClick ¶
func (node *Node) MustClick()
MustClick function to click on an element and panic if an error occurs.
func (*Node) MustDoubleClick ¶
func (node *Node) MustDoubleClick()
MustDoubleClick function to double click on an element and panic if an error occurs.
func (*Node) MustGetElementByClass ¶
MustGetElementByClass function to find an element by class and panic if not found.
func (*Node) MustGetElementByContentDesc ¶
MustGetElementByContentDesc function to find an element by content-desc and panic if not found.
func (*Node) MustGetElementById ¶
MustGetElementById function to find an element by id and panic if not found.
func (*Node) MustGetElementByText ¶
MustGetElementByText function to find an element by text and panic if not found.
func (*Node) MustInsertText ¶
MustInsertText function to insert text into an element and panic if an error occurs.
func (*Node) MustLongClick ¶
MustLongClick function to long click on an element with given duration and panic if an error occurs.
func (*Node) ResourceID ¶
ResourceID function to get the resource ID of an element.