Unable to get element of my pop up sign up

198 Views Asked by At

Cypress is not able to find the XPath or element location of the pop up sign up. I want to enter email and password, confirm password and then enter. But I am unable to get the elements of these fields. Can someone please tell me how to take xpaths or locators of the pop up forms. I am attaching the link and image below for more clarity https://birdhunt.bubbleapps.io/version-test/ enter image description here

2

There are 2 best solutions below

0
On

To complete, you should use relative XPath expressions instead of absolute ones. In your case :

//input[@placeholder="Email"]
//input[@placeholder="Password"]
//input[@placeholder="Confirm password"]
0
On

The xpath is valid, so it's likely you forgot to add the cypress-xpath add-in.

See the documentation here

Install with npm
npm install -D @cypress/xpath

Install with Yarn yarn add @cypress/xpath --dev

Then include in your project's support file
require('@cypress/xpath');

But you are using cy.get() with an xpath expression, which should be obvious mistake.

Either use cy.get('css-selector-here') or use cy.xpath('xpath-expression-here').