externalPress
Hierarchy
Index
Methods
staticexternalthe
Instantiates an interaction that instructs the actor to press a sequence of keys,
When no
field
is specified, the key sequence will be sent to the currently focused element, and if no element is focused - to thedocument.body
to handle.Parameters
externalrest...keys: Answerable<string | string[] | Key | Key[]>[]
A sequence of one or more keys to press
Returns Activity & { in: (field: Answerable<PageElement<any>>) => Interaction }
externalinstantiationLocation
Returns the location where this
Activity
was instantiated.Returns FileSystemLocation
externaldescribedBy
Resolves the description of this object in the context of the provided
actor
.Parameters
externalactor: AnswersQuestions & UsesAbilities & { name: string }
Returns Promise<string>
externaltoString
Returns a human-readable description of this object.
Returns string
externalin
Send the key sequence to a specific element.
Parameters
externalfield: Answerable<PageElement<any>>
Returns Interaction
externalperformAs
Instructs the provided
Actor
to perform thisInteraction
.Learn more
Parameters
externalactor: UsesAbilities & AnswersQuestions
Returns Promise<void>
Instructs an actor who has the ability to
BrowseTheWeb
to send a key press or a sequence of keys to a Web element.Note: On macOS, some keyboard shortcuts might not work with the
devtools
protocol.For example:
Key.Meta
+C
, useKey.Control
+Key.Insert
Key.Meta
+X
, useKey.Control
+Key.Delete
Key.Meta
+V
, useKey.Shift
+Key.Insert
Example widget
Lean Page Object describing the widget
Pressing keys
Learn more
Key
BrowseTheWeb
PageElement