abstractPageElement <Native_Element_Type>
Implements
- Optional
- Switchable
Index
Methods
staticlocated
Type parameters
- NET
Parameters
selector: Answerable<Selector>
Returns Question<Promise<PageElement<NET>>> & Interaction & { isPresent: any } & QuestionAdapterFieldDecorator<PageElement<NET>> & MetaQuestion<PageElement<any>, PageElement<any>>
staticof
Type parameters
- NET
Parameters
childElement: Answerable<PageElement<NET>>
parentElement: Answerable<PageElement<NET>>
Returns Question<Promise<PageElement<NET>>> & Interaction & { isPresent: any } & QuestionAdapterFieldDecorator<PageElement<NET>> & MetaQuestion<PageElement<any>, PageElement<any>>
abstractof
Parameters
parentElement: PageElement<Native_Element_Type>
Returns PageElement<Native_Element_Type>
nativeElement
An âescape hatchâ providing access to the integration tool-specific implementation of a Web element.
Returns Promise<Native_Element_Type>
toString
Returns string
abstractenterValue
Parameters
value: string | number | (string | number)[]
Returns Promise<void>
abstractclearValue
Returns Promise<void>
abstractclick
Returns Promise<void>
abstractdoubleClick
Returns Promise<void>
abstractscrollIntoView
Returns Promise<void>
abstracthoverOver
Returns Promise<void>
abstractrightClick
Returns Promise<void>
abstractselectOptions
Parameters
rest...options: SelectOption[]
Returns Promise<void>
abstractselectedOptions
Returns Promise<SelectOption[]>
abstractattribute
Parameters
name: string
Returns Promise<string>
abstracttext
Returns Promise<string>
abstractvalue
Returns Promise<string>
abstractswitchTo
When the element represents an
iframe
, calling this method switches the current browsing context to the giveniframe
context.When used with other types of Web
Element
, calling this method will have the same result as callingElement.focus()
.Returns Promise<SwitchableOrigin>
Returns an object that allows the caller to switch back to the previous context if needed.
Learn more
abstractisActive
Resolves to
true
when the underlying element has focus. Otherwise, resolves tofalse
.Returns Promise<boolean>
abstractisClickable
Resolves to
true
when the underlying element can be clicked on. Otherwise, resolves tofalse
.Please refer to test integration tool-specific documentation for details.
Returns Promise<boolean>
abstractisEnabled
Resolves to
true
when the underlying element is not explicitly disabledPlease refer to test integration tool-specific documentation for details.
Returns Promise<boolean>
isPresent
Returns a Promise that resolves to
true
when the element is present in the Document Object Model (DOM),false
otherwise.Returns Promise<boolean>
abstractisSelected
Resolves to
true
when the underlying element:- has a
selected
attribute for<option />
elements - has a
checked
attribute for checkboxes
Otherwise, resolves to
false
.Returns Promise<boolean>
- has a
abstractisVisible
Resolves to
true
when the underlying element:- is not hidden, so doesnât have CSS style like
display: none
,visibility: hidden
oropacity: 0
- is within the browser viewport
- doesnât have its centre covered by other elements
Otherwise, resolves to
false
.Returns Promise<boolean>
- is not hidden, so doesnât have CSS style like
Constructors
constructor
Type parameters
- Native_Element_Type = any
Parameters
locator: Locator<Native_Element_Type, any>
Returns PageElement<Native_Element_Type>
Uses the actorâs ability to BrowseTheWeb to identify a single Web element located by Selector.
Learn more