FrameLocator

Playwright\Frame\FrameLocatorInterface

Methods

locator()

LocatorInterface

Create a locator within this frame.

function locator(string $selector): LocatorInterface

getByAltText()

LocatorInterface
function getByAltText(string $text, array $options = []): LocatorInterface

getByLabel()

LocatorInterface
function getByLabel(string $text, array $options = []): LocatorInterface

getByPlaceholder()

LocatorInterface
function getByPlaceholder(string $text, array $options = []): LocatorInterface

getByRole()

LocatorInterface
function getByRole(string $role, array $options = []): LocatorInterface

getByTestId()

LocatorInterface
function getByTestId(string $testId): LocatorInterface

getByText()

LocatorInterface
function getByText(string $text, array $options = []): LocatorInterface

getByTitle()

LocatorInterface
function getByTitle(string $text, array $options = []): LocatorInterface

first()

self

Get the first frame matching the selector.

function first(): self

last()

self

Get the last frame matching the selector.

function last(): self

nth()

self

Get the nth frame matching the selector (0-indexed).

function nth(int $index): self

frameLocator()

self

Create a nested frame locator.

function frameLocator(string $selector): self

getSelector()

string

Get the frame selector.

function getSelector(): string

owner()

LocatorInterface

Get locator for the frame element itself.

function owner(): LocatorInterface