Skip to content
Discussion options

You must be logged in to vote

I love your question, so I'd like to offer you not just an answer, but also my thinking behind it.

TL;DR - What are page elements?

Page elements are standardised abstractions around web integration tool-specific representations of web elements, such as Element in Selenium-based tools or Locator in Playwright.

A construct like PageElement.located(By.css('...')) returns a composable Question implementation (a MetaQuestionAdapter to be precise) that allows for composing page elements together, or mapping them to transform their value.

import { By, PageElement, Text } from '@serenity-js/web'

export const basketTotal = () =>
  PageElement.located(By.css('#basket .total'))
    .describedAs('ba…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jan-molak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants