ui

package
Version: v0.0.0-...-99b9b9d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 27, 2021 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

Package ui enables interacting with the ChromeOS UI through the chrome.automation API. The chrome.automation API is documented here: https://developer.chrome.com/extensions/automation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoActiveRadioButton = errors.New("no active radio button is selected")

ErrNoActiveRadioButton is returned when no active radio group is selected.

View Source
var ErrNoRadioButtons = errors.New("no radio buttons in this radio group")

ErrNoRadioButtons is returned when there are no radio buttons under the radio group.

View Source
var ErrNodeDoesNotExist = errors.New("node does not exist")

ErrNodeDoesNotExist is returned when the node is not found.

View Source
var ErrNodeExists = errors.New("node still exists")

ErrNodeExists is returned when the node is found, but should not exist.

Functions

func Exists

func Exists(ctx context.Context, tconn *chrome.TestConn, params FindParams) (bool, error)

Exists checks if a descendant of the root node can be found. If the JavaScript fails to execute, an error is returned.

func Select

func Select(ctx context.Context, startNode *Node, startOffset int, endNode *Node, endOffset int) error

Select sets the document selection to include everything between the two nodes at the offsets. If the JavaScript fails to execute, an error is returned.

func StableFindAndClick

func StableFindAndClick(ctx context.Context, tconn *chrome.TestConn, params FindParams, opts *testing.PollOptions) error

StableFindAndClick waits for the first matching stable node and then left clicks it.

func StableFindAndRightClick

func StableFindAndRightClick(ctx context.Context, tconn *chrome.TestConn, params FindParams, opts *testing.PollOptions) error

StableFindAndRightClick waits for the first matching stable node and then right clicks it.

func WaitForLocationChangeCompleted

func WaitForLocationChangeCompleted(ctx context.Context, tconn *chrome.TestConn) error

WaitForLocationChangeCompleted calls WaitForLocationChangeCompletedOnNode on the entire desktop.

func WaitForLocationChangeCompletedOnNode

func WaitForLocationChangeCompletedOnNode(ctx context.Context, tconn *chrome.TestConn, node *Node) error

WaitForLocationChangeCompletedOnNode waits for any location-change events on the given node to be propagated to the automation API. Because automation API is asynchronous and eventually consistent with the desktop bounds, sometimes the automation API may report the intermediate bounds for an already completed animation. This function waits for such changes to be propagated fully to the automation API.

func WaitUntilExists

func WaitUntilExists(ctx context.Context, tconn *chrome.TestConn, params FindParams, timeout time.Duration) error

WaitUntilExists checks if a node exists repeatedly until the timeout. If the JavaScript fails to execute, an error is returned.

func WaitUntilGone

func WaitUntilGone(ctx context.Context, tconn *chrome.TestConn, params FindParams, timeout time.Duration) error

WaitUntilGone checks if a node doesn't exist repeatedly until the timeout. If the JavaScript fails to execute, an error is returned.

Types

type CheckedState

type CheckedState string

CheckedState describes the checked state of a chrome.automation AutomationNode.

const (
	CheckedStateTrue  CheckedState = "true"
	CheckedStateFalse CheckedState = "false"
	CheckedStateMixed CheckedState = "mixed"
)

As defined in https://chromium.googlesource.com/chromium/src/+/HEAD/extensions/common/api/automation.idl

type Event

type Event struct {
	Target    *Node
	Type      EventType `json:"type"`
	EventFrom string    `json:"eventFrom"`
	MouseX    int       `json:"mouseX"`
	MouseY    int       `json:"mouseY"`
}

Event represents a chrome.automation AutomationEvent. See https://chromium.googlesource.com/chromium/src/+/HEAD/extensions/common/api/automation.idl#492 Do not forget to release the Target node.

type EventSlice

type EventSlice []Event

EventSlice is a slice of Events. It is used for releaseing nodes in a group of events.

func (EventSlice) Release

func (es EventSlice) Release(ctx context.Context)

Release frees the reference to Javascript for this node.

type EventType

type EventType string

EventType describes the type of a chrome.automation AutomationEvent.

const (
	EventTypeAccessKeyChanged                EventType = "accessKeyChanged"
	EventTypeActiveDescendantChanged         EventType = "activeDescendantChanged"
	EventTypeAlert                           EventType = "alert"
	EventTypeAriaAttributeChanged            EventType = "ariaAttributeChanged"
	EventTypeAriaCurrentChanged              EventType = "ariaCurrentChanged"
	EventTypeAtomicChanged                   EventType = "atomicChanged"
	EventTypeAutoCompleteChanged             EventType = "autoCompleteChanged"
	EventTypeAutocorrectionOccured           EventType = "autocorrectionOccured"
	EventTypeBlur                            EventType = "blur"
	EventTypeBusyChanged                     EventType = "busyChanged"
	EventTypeCheckedStateChanged             EventType = "checkedStateChanged"
	EventTypeChildrenChanged                 EventType = "childrenChanged"
	EventTypeClassNameChanged                EventType = "classNameChanged"
	EventTypeClicked                         EventType = "clicked"
	EventTypeCollapsed                       EventType = "collapsed"
	EventTypeControlsChanged                 EventType = "controlsChanged"
	EventTypeDescribedByChanged              EventType = "describedByChanged"
	EventTypeDescriptionChanged              EventType = "descriptionChanged"
	EventTypeDocumentSelectionChanged        EventType = "documentSelectionChanged"
	EventTypeDocumentTitleChanged            EventType = "documentTitleChanged"
	EventTypeDropeffectChanged               EventType = "dropeffectChanged"
	EventTypeEditableTextChanged             EventType = "editableTextChanged"
	EventTypeEnabledChanged                  EventType = "enabledChanged"
	EventTypeEndOfTest                       EventType = "endOfTest"
	EventTypeExpanded                        EventType = "expanded"
	EventTypeExpandedChanged                 EventType = "expandedChanged"
	EventTypeFlowFromChanged                 EventType = "flowFromChanged"
	EventTypeFlowToChanged                   EventType = "flowToChanged"
	EventTypeFocus                           EventType = "focus"
	EventTypeFocusAfterMenuClose             EventType = "focusAfterMenuClose"
	EventTypeFocusChanged                    EventType = "focusChanged"
	EventTypeFocusContext                    EventType = "focusContext"
	EventTypeGrabbedChanged                  EventType = "grabbedChanged"
	EventTypeHaspopupChanged                 EventType = "haspopupChanged"
	EventTypeHide                            EventType = "hide"
	EventTypeHierarchicalLevelChanged        EventType = "hierarchicalLevelChanged"
	EventTypeHitTestResult                   EventType = "hitTestResult"
	EventTypeHover                           EventType = "hover"
	EventTypeIgnoredChanged                  EventType = "ignoredChanged"
	EventTypeImageAnnotationChanged          EventType = "imageAnnotationChanged"
	EventTypeImageFrameUpdated               EventType = "imageFrameUpdated"
	EventTypeInvalidStatusChanged            EventType = "invalidStatusChanged"
	EventTypeKeyShortcutsChanged             EventType = "keyShortcutsChanged"
	EventTypeLabeledByChanged                EventType = "labeledByChanged"
	EventTypeLanguageChanged                 EventType = "languageChanged"
	EventTypeLayoutComplete                  EventType = "layoutComplete"
	EventTypeLayoutInvalidated               EventType = "layoutInvalidated"
	EventTypeLiveRegionChanged               EventType = "liveRegionChanged"
	EventTypeLiveRegionCreated               EventType = "liveRegionCreated"
	EventTypeLiveRegionNodeChanged           EventType = "liveRegionNodeChanged"
	EventTypeLiveRelevantChanged             EventType = "liveRelevantChanged"
	EventTypeLiveStatusChanged               EventType = "liveStatusChanged"
	EventTypeLoadComplete                    EventType = "loadComplete"
	EventTypeLoadStart                       EventType = "loadStart"
	EventTypeLocationChanged                 EventType = "locationChanged"
	EventTypeMediaStartedPlaying             EventType = "mediaStartedPlaying"
	EventTypeMediaStoppedPlaying             EventType = "mediaStoppedPlaying"
	EventTypeMenuEnd                         EventType = "menuEnd"
	EventTypeMenuItemSelected                EventType = "menuItemSelected"
	EventTypeMenuListItemSelected            EventType = "menuListItemSelected"
	EventTypeMenuListValueChanged            EventType = "menuListValueChanged"
	EventTypeMenuPopupEnd                    EventType = "menuPopupEnd"
	EventTypeMenuPopupStart                  EventType = "menuPopupStart"
	EventTypeMenuStart                       EventType = "menuStart"
	EventTypeMouseCanceled                   EventType = "mouseCanceled"
	EventTypeMouseDragged                    EventType = "mouseDragged"
	EventTypeMouseMoved                      EventType = "mouseMoved"
	EventTypeMousePressed                    EventType = "mousePressed"
	EventTypeMouseReleased                   EventType = "mouseReleased"
	EventTypeMultilineStateChanged           EventType = "multilineStateChanged"
	EventTypeMultiselectableStateChanged     EventType = "multiselectableStateChanged"
	EventTypeNameChanged                     EventType = "nameChanged"
	EventTypeObjectAttributeChanged          EventType = "objectAttributeChanged"
	EventTypeOtherAttributeChanged           EventType = "otherAttributeChanged"
	EventTypeParentChanged                   EventType = "parentChanged"
	EventTypePlaceholderChanged              EventType = "placeholderChanged"
	EventTypePortalActivated                 EventType = "portalActivated"
	EventTypePositionInSetChanged            EventType = "positionInSetChanged"
	EventTypeRangeValueChanged               EventType = "rangeValueChanged"
	EventTypeRangeValueMaxChanged            EventType = "rangeValueMaxChanged"
	EventTypeRangeValueMinChanged            EventType = "rangeValueMinChanged"
	EventTypeRangeValueStepChanged           EventType = "rangeValueStepChanged"
	EventTypeReadonlyChanged                 EventType = "readonlyChanged"
	EventTypeRelatedNodeChanged              EventType = "relatedNodeChanged"
	EventTypeRequiredStateChanged            EventType = "requiredStateChanged"
	EventTypeRoleChanged                     EventType = "roleChanged"
	EventTypeRowCollapsed                    EventType = "rowCollapsed"
	EventTypeRowCountChanged                 EventType = "rowCountChanged"
	EventTypeRowExpanded                     EventType = "rowExpanded"
	EventTypeScrollHorizontalPositionChanged EventType = "scrollHorizontalPositionChanged"
	EventTypeScrollPositionChanged           EventType = "scrollPositionChanged"
	EventTypeScrollVerticalPositionChanged   EventType = "scrollVerticalPositionChanged"
	EventTypeScrolledToAnchor                EventType = "scrolledToAnchor"
	EventTypeSelectedChanged                 EventType = "selectedChanged"
	EventTypeSelectedChildrenChanged         EventType = "selectedChildrenChanged"
	EventTypeSelectedValueChanged            EventType = "selectedValueChanged"
	EventTypeSelection                       EventType = "selection"
	EventTypeSelectionAdd                    EventType = "selectionAdd"
	EventTypeSelectionInTextFieldChanged     EventType = "selectionInTextFieldChanged"
	EventTypeSelectionRemove                 EventType = "selectionRemove"
	EventTypeSetSizeChanged                  EventType = "setSizeChanged"
	EventTypeShow                            EventType = "show"
	EventTypeSortChanged                     EventType = "sortChanged"
	EventTypeStateChanged                    EventType = "stateChanged"
	EventTypeSubtreeCreated                  EventType = "subtreeCreated"
	EventTypeTextAttributeChanged            EventType = "textAttributeChanged"
	EventTypeTextSelectionChanged            EventType = "textSelectionChanged"
	EventTypeTextChanged                     EventType = "textChanged"
	EventTypeTooltipClosed                   EventType = "tooltipClosed"
	EventTypeTooltipOpened                   EventType = "tooltipOpened"
	EventTypeTreeChanged                     EventType = "treeChanged"
	EventTypeValueInTextFieldChanged         EventType = "valueInTextFieldChanged"
	EventTypeValueChanged                    EventType = "valueChanged"
	EventTypeWindowActivated                 EventType = "windowActivated"
	EventTypeWindowDeactivated               EventType = "windowDeactivated"
	EventTypeWindowVisibilityChanged         EventType = "windowVisibilityChanged"
)

As defined in https://chromium.googlesource.com/chromium/src/+/HEAD/extensions/common/api/automation.idl

type EventWatcher

type EventWatcher struct {
	// contains filtered or unexported fields
}

EventWatcher registers the listener of AutomationEvent and watches the events.

func NewRootWatcher

func NewRootWatcher(ctx context.Context, tconn *chrome.TestConn, eventType EventType) (*EventWatcher, error)

NewRootWatcher creates a new event watcher on the root node for the specified event type.

func NewWatcher

func NewWatcher(ctx context.Context, n *Node, eventType EventType) (*EventWatcher, error)

NewWatcher creates a new event watcher on a node for the specified event type.

func (*EventWatcher) EnsureNoEvents

func (ew *EventWatcher) EnsureNoEvents(ctx context.Context, duration time.Duration) error

EnsureNoEvents waits the duration and returns nil if no events have occurred in the wait.

func (*EventWatcher) Release

func (ew *EventWatcher) Release(ctx context.Context) error

Release frees the resources and the reference to Javascript for this watcher.

func (*EventWatcher) WaitForEvent

func (ew *EventWatcher) WaitForEvent(ctx context.Context, timeout time.Duration) (EventSlice, error)

WaitForEvent waits for at least one event to occur on the event watcher and returns the list of the events. The caller is responsible to release EventSlice.

type FindParams

type FindParams struct {
	Role       RoleType
	Name       string
	ClassName  string
	Attributes map[string]interface{}
	State      map[StateType]bool
}

FindParams is a mapping of chrome.automation.FindParams to Golang. Name and ClassName allow quick access because they are common attributes. As defined in chromium/src/extensions/common/api/automation.idl

type Node

type Node struct {
	Checked        CheckedState       `json:"checked,omitempty"`
	ClassName      string             `json:"className,omitempty"`
	HTMLAttributes map[string]string  `json:"htmlAttributes,omitempty"`
	Location       coords.Rect        `json:"location,omitempty"`
	Name           string             `json:"name,omitempty"`
	Restriction    RestrictionState   `json:"restriction,omitempty"`
	Role           RoleType           `json:"role,omitempty"`
	State          map[StateType]bool `json:"state,omitempty"`
	Value          string             `json:"value,omitempty"`
	// contains filtered or unexported fields
}

Node is a reference to chrome.automation API AutomationNode. Node intentionally leaves out many properties. If they become needed, add them to the Node struct and to the Update function. As defined in chromium/src/extensions/common/api/automation.idl Exported fields are sorted in alphabetical order.

func Find

func Find(ctx context.Context, tconn *chrome.TestConn, params FindParams) (*Node, error)

Find finds the first descendant of the root node matching the params and returns it. If the JavaScript fails to execute, an error is returned.

func FindWithTimeout

func FindWithTimeout(ctx context.Context, tconn *chrome.TestConn, params FindParams, timeout time.Duration) (*Node, error)

FindWithTimeout finds a descendant of the root node using params and returns it. If the JavaScript fails to execute, an error is returned.

func NewNode

func NewNode(ctx context.Context, tconn *chrome.TestConn, obj *chrome.JSObject) (*Node, error)

NewNode creates a new node struct and initializes its fields. NewNode takes ownership of obj and will release it if the node fails to initialize.

func Root

func Root(ctx context.Context, tconn *chrome.TestConn) (*Node, error)

Root returns the chrome.automation root as a Node. If the JavaScript fails to execute, an error is returned.

func StableFind

func StableFind(ctx context.Context, tconn *chrome.TestConn, params FindParams, opts *testing.PollOptions) (node *Node, err error)

StableFind repeatedly finds the first matching node until the node's location if stable. It will relocate the node if unexpected error happens, such as an element being refreshed. Stable*Click and WaitLocationStable are alternative solutions if the node is not completely deleted and recreated. Side effect: using this function will increase the test duration. Error example: "Failed to update the node's location: unexpected end of JSON input". Error example: "Cannot read property 'left' of undefined".

func (*Node) Attribute

func (n *Node) Attribute(ctx context.Context, attributeName string) (interface{}, error)

Attribute gets the specified attribute of this node. This method is for odd/uncommon attributes. For common attributes, add them to the Node struct. If the JavaScript fails to execute, an error is returned.

func (*Node) Children

func (n *Node) Children(ctx context.Context) (NodeSlice, error)

Children returns the children of the node. If the JavaScript fails to execute, an error is returned.

func (*Node) Descendant

func (n *Node) Descendant(ctx context.Context, params FindParams) (*Node, error)

Descendant finds the first descendant of this node matching the params and returns it. If the JavaScript fails to execute, an error is returned.

func (*Node) DescendantExists

func (n *Node) DescendantExists(ctx context.Context, params FindParams) (bool, error)

DescendantExists checks if a descendant of this node can be found. If the JavaScript fails to execute, an error is returned.

func (*Node) DescendantWithTimeout

func (n *Node) DescendantWithTimeout(ctx context.Context, params FindParams, timeout time.Duration) (*Node, error)

DescendantWithTimeout finds a descendant of this node using params and returns it. If the timeout is hit or the JavaScript fails to execute, an error is returned.

func (*Node) Descendants

func (n *Node) Descendants(ctx context.Context, params FindParams) (NodeSlice, error)

Descendants finds all descendant of this node matching the params and returns them. If the JavaScript fails to execute, an error is returned.

func (*Node) DoDefault

func (n *Node) DoDefault(ctx context.Context) error

DoDefault calls doDefault() Javascript method of the AutomationNode to make target node perform its default action. TODO(crbug/1173588): Remove after mouse clicks work with Lacros browser.

func (*Node) DoubleClick

func (n *Node) DoubleClick(ctx context.Context) error

DoubleClick executes 2 mouse left clicks on the node. If the JavaScript fails to execute, an error is returned.

func (*Node) FindSelectedRadioButton

func (n *Node) FindSelectedRadioButton(ctx context.Context) (*Node, error)

FindSelectedRadioButton finds the selected radio button under a radio group node. If no active radio button is selected, an error is returned.

func (*Node) FocusAndWait

func (n *Node) FocusAndWait(ctx context.Context, timeout time.Duration) error

FocusAndWait calls the focus() Javascript method of the AutomationNode. This can be used to scroll to nodes which aren't currently visible, enabling them to be clicked. The focus event is not instant, so an EventWatcher (watcher.go) is used to check its status. The EventWatcher waits the duration of timeout for the event to occur.

func (*Node) LeftClick

func (n *Node) LeftClick(ctx context.Context) error

LeftClick executes a left click on the node. If the JavaScript fails to execute, an error is returned.

func (*Node) LeftClickUntil

func (n *Node) LeftClickUntil(ctx context.Context, condition func(context.Context) (bool, error), opts *testing.PollOptions) error

LeftClickUntil repeatedly left clicks the node until the condition returns true with no error. This is useful for situations where there is no indication of whether the node is ready to receive clicks. The interval between clicks and the timeout can be specified using testing.PollOptions. todo(crbug/1099507): remove this function when we have a better indicator of clickability in general

func (*Node) MakeVisible

func (n *Node) MakeVisible(ctx context.Context) error

MakeVisible calls makeVisible() Javascript method of the AutomationNode to make target node visible.

func (*Node) Matches

func (n *Node) Matches(ctx context.Context, params FindParams) (bool, error)

Matches returns whether this node matches the given params.

func (*Node) Release

func (n *Node) Release(ctx context.Context)

Release frees the reference to Javascript for this node.

func (*Node) RightClick

func (n *Node) RightClick(ctx context.Context) error

RightClick executes a right click on the node. If the JavaScript fails to execute, an error is returned.

func (*Node) StableDoubleClick

func (n *Node) StableDoubleClick(ctx context.Context, pollOpts *testing.PollOptions) error

StableDoubleClick waits for the location to be stable and then double clicks the node. The location must be stable for 1 iteration of polling (default 100ms).

func (*Node) StableLeftClick

func (n *Node) StableLeftClick(ctx context.Context, pollOpts *testing.PollOptions) error

StableLeftClick waits for the location to be stable and then left clicks the node. The location must be stable for 1 iteration of polling (default 100ms).

func (*Node) StableRightClick

func (n *Node) StableRightClick(ctx context.Context, pollOpts *testing.PollOptions) error

StableRightClick waits for the location to be stable and then right clicks the node. The location must be stable for 1 iteration of polling (default 100ms).

func (*Node) ToString

func (n *Node) ToString(ctx context.Context) (string, error)

ToString returns string representation of node. If the JavaScript fails to execute, an error is returned.

func (*Node) Update

func (n *Node) Update(ctx context.Context) error

Update reloads the fields of this node.

func (*Node) WaitLocationStable

func (n *Node) WaitLocationStable(ctx context.Context, pollOpts *testing.PollOptions) error

WaitLocationStable waits for the nodes location to be the same for a single iteration of polling. Polling options work the same way as in testing.Poll().

func (*Node) WaitUntilDescendantExists

func (n *Node) WaitUntilDescendantExists(ctx context.Context, params FindParams, timeout time.Duration) error

WaitUntilDescendantExists checks if a descendant node exists repeatedly until the timeout. If the timeout is hit or the JavaScript fails to execute, an error is returned.

func (*Node) WaitUntilDescendantGone

func (n *Node) WaitUntilDescendantGone(ctx context.Context, params FindParams, timeout time.Duration) error

WaitUntilDescendantGone checks if a descendant node doesn't exist repeatedly until the timeout. If the timeout is hit or the JavaScript fails to execute, an error is returned.

type NodeSlice

type NodeSlice []*Node

NodeSlice is a slice of pointers to nodes. It is used for releaseing a group of nodes.

func FindAll

func FindAll(ctx context.Context, tconn *chrome.TestConn, params FindParams) (NodeSlice, error)

FindAll finds all descendants of the root node matching the params and returns them. If the JavaScript fails to execute, an error is returned.

func (NodeSlice) Release

func (nodes NodeSlice) Release(ctx context.Context)

Release frees the reference to Javascript for this node.

type RestrictionState

type RestrictionState string

RestrictionState describes the restriction state of a chrome.automation AutomationNode.

const (
	RestrictionDisabled RestrictionState = "disabled"
	RestrictionReadOnly RestrictionState = "readOnly"
	RestrictionNone     RestrictionState = ""
)

As defined in https://chromium.googlesource.com/chromium/src/+/HEAD/extensions/common/api/automation.idl

type RoleType

type RoleType string

RoleType describes the purpose of a chrome.automation AutomationNode.

const (
	RoleTypeAbbr                   RoleType = "abbr"
	RoleTypeAlert                  RoleType = "alert"
	RoleTypeAlertDialog            RoleType = "alertDialog"
	RoleTypeAnchor                 RoleType = "anchor"
	RoleTypeApplication            RoleType = "application"
	RoleTypeArticle                RoleType = "article"
	RoleTypeAudio                  RoleType = "audio"
	RoleTypeBanner                 RoleType = "banner"
	RoleTypeBlockquote             RoleType = "blockquote"
	RoleTypeButton                 RoleType = "button"
	RoleTypeCanvas                 RoleType = "canvas"
	RoleTypeCaption                RoleType = "caption"
	RoleTypeCaret                  RoleType = "caret"
	RoleTypeCell                   RoleType = "cell"
	RoleTypeCheckBox               RoleType = "checkBox"
	RoleTypeClient                 RoleType = "client"
	RoleTypeCode                   RoleType = "code"
	RoleTypeColorWell              RoleType = "colorWell"
	RoleTypeColumn                 RoleType = "column"
	RoleTypeColumnHeader           RoleType = "columnHeader"
	RoleTypeComboBoxGrouping       RoleType = "comboBoxGrouping"
	RoleTypeComboBoxMenuButton     RoleType = "comboBoxMenuButton"
	RoleTypeComment                RoleType = "comment"
	RoleTypeComplementary          RoleType = "complementary"
	RoleTypeContentDeletion        RoleType = "contentDeletion"
	RoleTypeContentInsertion       RoleType = "contentInsertion"
	RoleTypeContentInfo            RoleType = "contentInfo"
	RoleTypeDate                   RoleType = "date"
	RoleTypeDateTime               RoleType = "dateTime"
	RoleTypeDefinition             RoleType = "definition"
	RoleTypeDescriptionList        RoleType = "descriptionList"
	RoleTypeDescriptionListDetail  RoleType = "descriptionListDetail"
	RoleTypeDescriptionListTerm    RoleType = "descriptionListTerm"
	RoleTypeDesktop                RoleType = "desktop"
	RoleTypeDetails                RoleType = "details"
	RoleTypeDialog                 RoleType = "dialog"
	RoleTypeDirectory              RoleType = "directory"
	RoleTypeDisclosureTriangle     RoleType = "disclosureTriangle"
	RoleTypeDocAbstract            RoleType = "docAbstract"
	RoleTypeDocAcknowledgments     RoleType = "docAcknowledgments"
	RoleTypeDocAfterword           RoleType = "docAfterword"
	RoleTypeDocAppendix            RoleType = "docAppendix"
	RoleTypeDocBackLink            RoleType = "docBackLink"
	RoleTypeDocBiblioEntry         RoleType = "docBiblioEntry"
	RoleTypeDocBibliography        RoleType = "docBibliography"
	RoleTypeDocBiblioRef           RoleType = "docBiblioRef"
	RoleTypeDocChapter             RoleType = "docChapter"
	RoleTypeDocColophon            RoleType = "docColophon"
	RoleTypeDocConclusion          RoleType = "docConclusion"
	RoleTypeDocCover               RoleType = "docCover"
	RoleTypeDocCredit              RoleType = "docCredit"
	RoleTypeDocCredits             RoleType = "docCredits"
	RoleTypeDocDedication          RoleType = "docDedication"
	RoleTypeDocEndnote             RoleType = "docEndnote"
	RoleTypeDocEndnotes            RoleType = "docEndnotes"
	RoleTypeDocEpigraph            RoleType = "docEpigraph"
	RoleTypeDocEpilogue            RoleType = "docEpilogue"
	RoleTypeDocErrata              RoleType = "docErrata"
	RoleTypeDocExample             RoleType = "docExample"
	RoleTypeDocFootnote            RoleType = "docFootnote"
	RoleTypeDocForeword            RoleType = "docForeword"
	RoleTypeDocGlossary            RoleType = "docGlossary"
	RoleTypeDocGlossRef            RoleType = "docGlossRef"
	RoleTypeDocIndex               RoleType = "docIndex"
	RoleTypeDocIntroduction        RoleType = "docIntroduction"
	RoleTypeDocNoteRef             RoleType = "docNoteRef"
	RoleTypeDocNotice              RoleType = "docNotice"
	RoleTypeDocPageBreak           RoleType = "docPageBreak"
	RoleTypeDocPageFooter          RoleType = "docPageFooter"
	RoleTypeDocPageHeader          RoleType = "docPageHeader"
	RoleTypeDocPageList            RoleType = "docPageList"
	RoleTypeDocPart                RoleType = "docPart"
	RoleTypeDocPreface             RoleType = "docPreface"
	RoleTypeDocPrologue            RoleType = "docPrologue"
	RoleTypeDocPullquote           RoleType = "docPullquote"
	RoleTypeDocQna                 RoleType = "docQna"
	RoleTypeDocSubtitle            RoleType = "docSubtitle"
	RoleTypeDocTip                 RoleType = "docTip"
	RoleTypeDocToc                 RoleType = "docToc"
	RoleTypeDocument               RoleType = "document"
	RoleTypeEmbeddedObject         RoleType = "embeddedObject"
	RoleTypeEmphasis               RoleType = "emphasis"
	RoleTypeFeed                   RoleType = "feed"
	RoleTypeFigcaption             RoleType = "figcaption"
	RoleTypeFigure                 RoleType = "figure"
	RoleTypeFooter                 RoleType = "footer"
	RoleTypeFooterAsNonLandmark    RoleType = "footerAsNonLandmark"
	RoleTypeForm                   RoleType = "form"
	RoleTypeGenericContainer       RoleType = "genericContainer"
	RoleTypeGraphicsDocument       RoleType = "graphicsDocument"
	RoleTypeGraphicsObject         RoleType = "graphicsObject"
	RoleTypeGraphicsSymbol         RoleType = "graphicsSymbol"
	RoleTypeGrid                   RoleType = "grid"
	RoleTypeGroup                  RoleType = "group"
	RoleTypeHeader                 RoleType = "header"
	RoleTypeHeaderAsNonLandmark    RoleType = "headerAsNonLandmark"
	RoleTypeHeading                RoleType = "heading"
	RoleTypeIframe                 RoleType = "iframe"
	RoleTypeIframePresentational   RoleType = "iframePresentational"
	RoleTypeIgnored                RoleType = "ignored"
	RoleTypeImage                  RoleType = "image"
	RoleTypeImageMap               RoleType = "imageMap"
	RoleTypeImeCandidate           RoleType = "imeCandidate"
	RoleTypeInlineTextBox          RoleType = "inlineTextBox"
	RoleTypeInputTime              RoleType = "inputTime"
	RoleTypeKeyboard               RoleType = "keyboard"
	RoleTypeLabelText              RoleType = "labelText"
	RoleTypeLayoutTable            RoleType = "layoutTable"
	RoleTypeLayoutTableCell        RoleType = "layoutTableCell"
	RoleTypeLayoutTableRow         RoleType = "layoutTableRow"
	RoleTypeLegend                 RoleType = "legend"
	RoleTypeLineBreak              RoleType = "lineBreak"
	RoleTypeLink                   RoleType = "link"
	RoleTypeList                   RoleType = "list"
	RoleTypeListBox                RoleType = "listBox"
	RoleTypeListBoxOption          RoleType = "listBoxOption"
	RoleTypeListGrid               RoleType = "listGrid"
	RoleTypeListItem               RoleType = "listItem"
	RoleTypeListMarker             RoleType = "listMarker"
	RoleTypeLog                    RoleType = "log"
	RoleTypeMain                   RoleType = "main"
	RoleTypeMark                   RoleType = "mark"
	RoleTypeMarquee                RoleType = "marquee"
	RoleTypeMath                   RoleType = "math"
	RoleTypeMenu                   RoleType = "menu"
	RoleTypeMenuBar                RoleType = "menuBar"
	RoleTypeMenuItem               RoleType = "menuItem"
	RoleTypeMenuItemCheckBox       RoleType = "menuItemCheckBox"
	RoleTypeMenuItemRadio          RoleType = "menuItemRadio"
	RoleTypeMenuListOption         RoleType = "menuListOption"
	RoleTypeMenuListPopup          RoleType = "menuListPopup"
	RoleTypeMeter                  RoleType = "meter"
	RoleTypeNavigation             RoleType = "navigation"
	RoleTypeNote                   RoleType = "note"
	RoleTypePane                   RoleType = "pane"
	RoleTypeParagraph              RoleType = "paragraph"
	RoleTypePdfActionableHighlight RoleType = "pdfActionableHighlight"
	RoleTypePluginObject           RoleType = "pluginObject"
	RoleTypePopUpButton            RoleType = "popUpButton"
	RoleTypePortal                 RoleType = "portal"
	RoleTypePre                    RoleType = "pre"
	RoleTypePresentational         RoleType = "presentational"
	RoleTypeProgressIndicator      RoleType = "progressIndicator"
	RoleTypeRadioButton            RoleType = "radioButton"
	RoleTypeRadioGroup             RoleType = "radioGroup"
	RoleTypeRegion                 RoleType = "region"
	RoleTypeRootWebArea            RoleType = "rootWebArea"
	RoleTypeRow                    RoleType = "row"
	RoleTypeRowGroup               RoleType = "rowGroup"
	RoleTypeRowHeader              RoleType = "rowHeader"
	RoleTypeRuby                   RoleType = "ruby"
	RoleTypeRubyAnnotation         RoleType = "rubyAnnotation"
	RoleTypeScrollBar              RoleType = "scrollBar"
	RoleTypeScrollView             RoleType = "scrollView"
	RoleTypeSearch                 RoleType = "search"
	RoleTypeSearchBox              RoleType = "searchBox"
	RoleTypeSection                RoleType = "section"
	RoleTypeSlider                 RoleType = "slider"
	RoleTypeSpinButton             RoleType = "spinButton"
	RoleTypeSplitter               RoleType = "splitter"
	RoleTypeStaticText             RoleType = "staticText"
	RoleTypeStatus                 RoleType = "status"
	RoleTypeStrong                 RoleType = "strong"
	RoleTypeSuggestion             RoleType = "suggestion"
	RoleTypeSvgRoot                RoleType = "svgRoot"
	RoleTypeSwitch                 RoleType = "switch"
	RoleTypeTab                    RoleType = "tab"
	RoleTypeTabList                RoleType = "tabList"
	RoleTypeTabPanel               RoleType = "tabPanel"
	RoleTypeTable                  RoleType = "table"
	RoleTypeTableHeaderContainer   RoleType = "tableHeaderContainer"
	RoleTypeTerm                   RoleType = "term"
	RoleTypeTextField              RoleType = "textField"
	RoleTypeTextFieldWithComboBox  RoleType = "textFieldWithComboBox"
	RoleTypeTime                   RoleType = "time"
	RoleTypeTimer                  RoleType = "timer"
	RoleTypeTitleBar               RoleType = "titleBar"
	RoleTypeToggleButton           RoleType = "toggleButton"
	RoleTypeToolbar                RoleType = "toolbar"
	RoleTypeTooltip                RoleType = "tooltip"
	RoleTypeTree                   RoleType = "tree"
	RoleTypeTreeGrid               RoleType = "treeGrid"
	RoleTypeTreeItem               RoleType = "treeItem"
	RoleTypeUnknown                RoleType = "unknown"
	RoleTypeVideo                  RoleType = "video"
	RoleTypeWebArea                RoleType = "webArea"
	RoleTypeWebView                RoleType = "webView"
	RoleTypeWindow                 RoleType = "window"
)

As defined in https://chromium.googlesource.com/chromium/src/+/HEAD/extensions/common/api/automation.idl

type StateType

type StateType string

StateType describes characteristics of a chrome.automation AutomationNode.

const (
	StateTypeAutofillAvailable StateType = "autofillAvailable"
	StateTypeCollapsed         StateType = "collapsed"
	StateTypeDefault           StateType = "default"
	StateTypeEditable          StateType = "editable"
	StateTypeExpanded          StateType = "expanded"
	StateTypeFocusable         StateType = "focusable"
	StateTypeFocused           StateType = "focused"
	StateTypeHorizontal        StateType = "horizontal"
	StateTypeHovered           StateType = "hovered"
	StateTypeIgnored           StateType = "ignored"
	StateTypeInvisible         StateType = "invisible"
	StateTypeLinked            StateType = "linked"
	StateTypeMultiline         StateType = "multiline"
	StateTypeMultiselectable   StateType = "multiselectable"
	StateTypeOffscreen         StateType = "offscreen"
	StateTypeProtected         StateType = "protected"
	StateTypeRequired          StateType = "required"
	StateTypeRichlyEditable    StateType = "richlyEditable"
	StateTypeVertical          StateType = "vertical"
	StateTypeVisited           StateType = "visited"
)

As defined in https://chromium.googlesource.com/chromium/src/+/HEAD/extensions/common/api/automation.idl

Directories

Path Synopsis
Package browser allows interactions with browser window.
Package browser allows interactions with browser window.
Package capturemode contains helper methods to work with Capture Mode.
Package capturemode contains helper methods to work with Capture Mode.
Package diagnosticsapp contains drivers for controlling the ui of diagnostics SWA.
Package diagnosticsapp contains drivers for controlling the ui of diagnostics SWA.
Package filesapp supports controlling the Files App on Chrome OS.
Package filesapp supports controlling the Files App on Chrome OS.
Package lockscreen is used to get information about the lock screen directly through the UI.
Package lockscreen is used to get information about the lock screen directly through the UI.
Package mouse injects mouse events via Chrome autotest private API.
Package mouse injects mouse events via Chrome autotest private API.
Package pointer provides utility interfaces to handle pointing devices (i.e.
Package pointer provides utility interfaces to handle pointing devices (i.e.
Package quicksettings is for controlling the Quick Settings directly from the UI.
Package quicksettings is for controlling the Quick Settings directly from the UI.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL