Questions tagged page-objects
Page classes, step decorators and the fixture set they hang off.
32 questions
How do you test a node-graph editor — blocks, edges and connection handles?
Half our product is a workflow builder: a canvas with about 190 block types, edges between them, and connection handles on each node. None of it is text or roles — the nodes…
asked by Nadia Belkacem8,611 ·One page object for a five-step wizard, or five? The URL never changes
Onboarding wizard, five panels, and the URL stays /onboarding the whole way through — the panel is swapped client-side and there is no route to address for steps two to five. Two…
asked by Zeynep Arslan64 ·OAuth consent opens a popup and my steps keep talking to the first tab
Clicking "Connect account" opens the provider's consent screen in a new tab. Everything after that in my scenario runs against the original tab, which is still sitting on the…
asked by Vikram Rajagopal1,240 ·No step for downloads — how do I assert that an export produced a real CSV?
We have about a dozen export buttons. The most I can assert from a feature file today is that a toast appeared, which passed happily for two weeks while the export was returning…
asked by Karine Moreau655 ·How do I fill a Stripe Elements card field from a feature file?
Checkout uses Elements, so the card number is inside an iframe. The obvious step does not find it: Which is fair enough — it is not in the main frame. I cannot find a frame step…
asked by Owen Brackley144 ·net::ERR_ABORTED on an authenticated route is our single biggest source of failures
Top error signature in a clean single-worker run, by a wide margin: 55 of the 192 failures I captured, plus a big pile of click timeouts that I am fairly sure are downstream of…
asked by Elsa Nyman333 ·OAuth popup during a recording: everything I did in the popup is missing from the spec
Recording a login that goes through our identity provider. The provider opens in a popup, you finish there, the popup closes and the app is signed in. The recorded spec has the…
asked by Ingrid Solberg241 ·Why one fixture set for ui, api and hybrid, and which of the fixtures are worker-scoped?
Reading steps/fixtures.ts in the project I inherited and trying to work out what I am extending. Two things I cannot find a straight answer to. Why is there one test rather than…
asked by Ingrid Solberg241 ·Migrating a Cucumber suite: what replaces the World object we keep scenario state in?
Our Cucumber suite keeps everything on the World: the id of the record the last step created, the current user, a couple of counters, and a response object that three later steps…
asked by Rasha Halabi572 ·Same locator healed five times and I still have no page-object proposal
The docs say three identical successful heals of the same locator produce a page-object patch proposal. Ours has healed five times across four nightly runs, same description,…
asked by Koen Vermeulen309 ·Is XPath actually forbidden in a page object, or only discouraged?
Reviewer left "never XPath" on my proposal. The locator strategy page says CSS or XPath as a last resort inside a page object with a heal context, which reads like "allowed but…
asked by Koen Vermeulen309 ·Our nth-child selectors break every sprint and healing never rescues them
Inherited suite, roughly two hundred locators in this shape: Every time the results list gains a badge or a promo row, a chunk of them break, and they break with HEAL_FAILED…
asked by Tanvi Bhatt126 ·How do I check whether a step already exists before I write another one?
Third proposal in a row bounced with "this step already exists in a different phrasing". Fair enough, but I am clearly missing whatever everyone else is looking at, because I did…
asked by Sergio Alcaraz415 ·An admin approves what a standard user submitted — how do two roles fit in one scenario?
The flow we need to cover: a standard user submits an expense claim, an admin approves it, and the standard user sees it move to approved. @user:standard gives me one role. I…
asked by Anouk de Vries238 ·Chaining a created id into a UI assertion: JSON path $.id is undefined in the last response
Trying to seed through the API and assert in the browser, which is the whole reason we picked this thing. The endpoint definitely returns an id, I checked with curl.
asked by Bea Lindqvist4,318 ·We renamed one button and 40 scenarios healed in the same run — now what?
Design renamed "Continue" to "Next" on the checkout stepper. Nothing failed. The nightly regression run is green and carries forty-one heal events, all with the same description,…
asked by Bea Lindqvist4,318 ·Can two projects share one page object, or do we copy the file and live with it?
We run two projects against the same design system: same header, same login form, same data grid, different products around them. The login page object is now duplicated in…
asked by Nikhil Sane487 ·Recorded spec is all .btn_primary and nth-child — fix the locators before or after converting?
Recorded a checkout. The spec is mostly this: Each of those came back with a // sdods:fragile comment above it, and the CLI finished with I would rather not convert this into a…
asked by Nikhil Sane487 ·My page object needs a signed-in session before goto() — where does the login belong?
Every one of our scenarios opens with the same three steps: go to login, fill two fields, submit. Then the real scenario starts. It is slow — about four seconds a scenario across…
asked by Helle Borg352 ·Inherited 900 Cypress specs: what maps to what, and what happens to custom commands?
I have inherited a Cypress suite. Roughly 900 specs, data-cy attributes throughout, about 60 custom commands in cypress/support/commands.js, and a cypress/fixtures folder nobody…
asked by Ade Oyinlola419 ·How deep should page objects nest? We are four levels in and it hurts
Our hierarchy is BasePage to AuthenticatedPage to DashboardPage to ReportsPage, and there is talk of a fifth level for the two report variants. Nobody can say where a locator…
asked by Renata Kohl608 ·Can I put an XPath in the css fallback list of a heal context?
Our app renders a summary table where the only stable thing about a row is its position relative to a header cell. The reviewer agent keeps flagging the selector, so I was going…
asked by Kostya Petrov7,903 ·How do you assert on a row in a table without writing a CSS chain?
Orders table, and the scenario I want reads: What I have in the page object is this, which works until someone sorts the table or the row moves to page two: Is there a…
asked by Sunita Kale982 ·Should I commit the suggested locator from a heal log, or go and find out why?
Our log has been telling us this for a fortnight: I cannot tell whether "update the page object" means "paste this in" or "go and find out why". The suggestion is obviously…
asked by Sam Orbison9,420 ·A header widget appears on six pages — one page object per page, or something else?
Our header carries the cart badge, the account menu and a search box, and it is on six pages. Right now the cart badge locator is copy-pasted into six page objects, which was…
asked by Nadia Belkacem8,611 ·Why does healing never kick in for expectHidden()?
Every positive assertion in our page object heals fine. This one never does: assert is in heal.actions, the context has a role, a name and a test id. The step fails with an…
asked by Gio Castellano521 ·Unknown route "checkuot" for project demo-shop — where does that list come from?
New page object, first run, immediate failure: The call is await this.goto('checkuot'). I do not remember declaring routes anywhere, so where is that list of four coming from and…
asked by Gio Castellano521 ·When should a step go in the shared library instead of my project's steps folder?
Reviewing a colleague's proposal and we disagreed twice in one file, so I would like a rule rather than a preference. They wrote When I add the extended warranty to the basket as…
asked by Karine Moreau655 ·Healing does nothing — I just get the normal Playwright timeout
We turned healing on for our checkout page object and the button still fails exactly the way it did before. No heal event, nothing in the log, just the Playwright timeout. The…
asked by Annika Solheim14,002 ·lint says Undefined step: Given I am on the checkout page, but the method is right there
The class has it: Spelling matches character for character, I diffed it. The file is pages/CheckoutPage.ts. What else is there to check?
asked by Hsu Wei-lin15,230 ·Coming from Selenium PageFactory — what replaces @FindBy and initElements?
We have a Java suite, maybe 300 tests, built the way everyone built them: a BasePage holding the driver and the waits, @FindBy(xpath = "//div[@class='cart']//button") fields, and…
asked by Dinuka Perera412 ·Where is a page object supposed to live? Mine is never picked up
I put my page object in projects/demo-shop/support/pages/LoginPage.ts because that is how our old framework was laid out. It compiles, the decorators are on the methods, and the…
asked by Marijn Kuiper18,840 ·