Skip to main content

Class: PlaywrightInteractor

@atomic-testing/playwright.PlaywrightInteractor

Implements

  • Interactor

Constructors

constructor

new PlaywrightInteractor(page): PlaywrightInteractor

Parameters

NameType
pagePage

Returns

PlaywrightInteractor

Defined in

PlaywrightInteractor.ts:22

Properties

page

Readonly page: Page

Defined in

PlaywrightInteractor.ts:22

Methods

click

click(locator, option?): Promise<void>

Parameters

NameType
locatorPartLocator
option?Partial<ClickOption>

Returns

Promise<void>

Implementation of

Interactor.click

Defined in

PlaywrightInteractor.ts:92


clone

clone(): Interactor

Returns

Interactor

Implementation of

Interactor.clone

Defined in

PlaywrightInteractor.ts:263


enterText

enterText(locator, text, option?): Promise<void>

Parameters

NameType
locatorPartLocator
textstring
option?Optional<Partial<EnterTextOption>>

Returns

Promise<void>

Implementation of

Interactor.enterText

Defined in

PlaywrightInteractor.ts:73


exists

exists(locator): Promise<boolean>

Parameters

NameType
locatorPartLocator

Returns

Promise<boolean>

Implementation of

Interactor.exists

Defined in

PlaywrightInteractor.ts:185


focus

focus(locator, _option): Promise<void>

Parameters

NameType
locatorPartLocator
_optionPartial<FocusOption>

Returns

Promise<void>

Implementation of

Interactor.focus

Defined in

PlaywrightInteractor.ts:145


getAttribute

getAttribute(locator, name, isMultiple): Promise<readonly string[]>

Parameters

NameType
locatorPartLocator
namestring
isMultipletrue

Returns

Promise<readonly string[]>

Implementation of

Interactor.getAttribute

Defined in

PlaywrightInteractor.ts:154

getAttribute(locator, name, isMultiple): Promise<Optional<string>>

Parameters

NameType
locatorPartLocator
namestring
isMultiplefalse

Returns

Promise<Optional<string>>

Implementation of

Interactor.getAttribute

Defined in

PlaywrightInteractor.ts:155

getAttribute(locator, name): Promise<Optional<string>>

Parameters

NameType
locatorPartLocator
namestring

Returns

Promise<Optional<string>>

Implementation of

Interactor.getAttribute

Defined in

PlaywrightInteractor.ts:156


getInputValue

getInputValue(locator): Promise<Optional<string>>

Parameters

NameType
locatorPartLocator

Returns

Promise<Optional<string>>

Implementation of

Interactor.getInputValue

Defined in

PlaywrightInteractor.ts:29


getSelectLabels

getSelectLabels(locator): Promise<Optional<readonly string[]>>

Parameters

NameType
locatorPartLocator

Returns

Promise<Optional<readonly string[]>>

Implementation of

Interactor.getSelectLabels

Defined in

PlaywrightInteractor.ts:49


getSelectValues

getSelectValues(locator): Promise<Optional<readonly string[]>>

Parameters

NameType
locatorPartLocator

Returns

Promise<Optional<readonly string[]>>

Implementation of

Interactor.getSelectValues

Defined in

PlaywrightInteractor.ts:34


getStyleValue

getStyleValue(locator, propertyName): Promise<Optional<string>>

Parameters

NameType
locatorPartLocator
propertyNameCssProperty

Returns

Promise<Optional<string>>

Implementation of

Interactor.getStyleValue

Defined in

PlaywrightInteractor.ts:64


getText

getText(locator): Promise<Optional<string>>

Parameters

NameType
locatorPartLocator

Returns

Promise<Optional<string>>

Implementation of

Interactor.getText

Defined in

PlaywrightInteractor.ts:179


hasAttribute

hasAttribute(locator, name): Promise<boolean>

Parameters

NameType
locatorPartLocator
namestring

Returns

Promise<boolean>

Implementation of

Interactor.hasAttribute

Defined in

PlaywrightInteractor.ts:258


hasCssClass

hasCssClass(locator, className): Promise<boolean>

Parameters

NameType
locatorPartLocator
classNamestring

Returns

Promise<boolean>

Implementation of

Interactor.hasCssClass

Defined in

PlaywrightInteractor.ts:248


hover

hover(locator, option?): Promise<void>

Parameters

NameType
locatorPartLocator
option?Partial<HoverOption>

Returns

Promise<void>

Implementation of

Interactor.hover

Defined in

PlaywrightInteractor.ts:97


isChecked

isChecked(locator): Promise<boolean>

Parameters

NameType
locatorPartLocator

Returns

Promise<boolean>

Implementation of

Interactor.isChecked

Defined in

PlaywrightInteractor.ts:191


isDisabled

isDisabled(locator): Promise<boolean>

Parameters

NameType
locatorPartLocator

Returns

Promise<boolean>

Implementation of

Interactor.isDisabled

Defined in

PlaywrightInteractor.ts:197


isReadonly

isReadonly(locator): Promise<boolean>

Parameters

NameType
locatorPartLocator

Returns

Promise<boolean>

Implementation of

Interactor.isReadonly

Defined in

PlaywrightInteractor.ts:203


isVisible

isVisible(locator): Promise<boolean>

Parameters

NameType
locatorPartLocator

Returns

Promise<boolean>

Implementation of

Interactor.isVisible

Defined in

PlaywrightInteractor.ts:208


mouseDown

mouseDown(locator, option?): Promise<void>

Parameters

NameType
locatorPartLocator
option?Partial<MouseDownOption>

Returns

Promise<void>

Implementation of

Interactor.mouseDown

Defined in

PlaywrightInteractor.ts:109


mouseEnter

mouseEnter(locator, _option?): Promise<void>

Parameters

NameType
locatorPartLocator
_option?Partial<MouseEnterOption>

Returns

Promise<void>

Implementation of

Interactor.mouseEnter

Defined in

PlaywrightInteractor.ts:137


mouseLeave

mouseLeave(locator, _option?): Promise<void>

Parameters

NameType
locatorPartLocator
_option?Partial<MouseLeaveOption>

Returns

Promise<void>

Implementation of

Interactor.mouseLeave

Defined in

PlaywrightInteractor.ts:141


mouseMove

mouseMove(locator, option?): Promise<void>

Parameters

NameType
locatorPartLocator
option?Partial<MouseMoveOption>

Returns

Promise<void>

Implementation of

Interactor.mouseMove

Defined in

PlaywrightInteractor.ts:102


mouseOut

mouseOut(locator, _option?): Promise<void>

Parameters

NameType
locatorPartLocator
_option?Partial<MouseOutOption>

Returns

Promise<void>

Implementation of

Interactor.mouseOut

Defined in

PlaywrightInteractor.ts:127


mouseOver

mouseOver(locator, option?): Promise<void>

Parameters

NameType
locatorPartLocator
option?Partial<HoverOption>

Returns

Promise<void>

Implementation of

Interactor.mouseOver

Defined in

PlaywrightInteractor.ts:123


mouseUp

mouseUp(locator, option?): Promise<void>

Parameters

NameType
locatorPartLocator
option?Partial<MouseUpOption>

Returns

Promise<void>

Implementation of

Interactor.mouseUp

Defined in

PlaywrightInteractor.ts:116


selectOptionValue

selectOptionValue(locator, values): Promise<void>

Parameters

NameType
locatorPartLocator
valuesstring[]

Returns

Promise<void>

Implementation of

Interactor.selectOptionValue

Defined in

PlaywrightInteractor.ts:24


wait

wait(ms): Promise<void>

Parameters

NameType
msnumber

Returns

Promise<void>

Implementation of

Interactor.wait

Defined in

PlaywrightInteractor.ts:150