Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

467
Views
How to test floating dialog boxes in cypress?

I am fairly new to cypress and practicing its functionalities on Facebook app. I am having an issue on testing these following scenarios:

  1. When clicked on First Name, this floating dialog should be visible.
  2. Validating the text in the dialog box to be 'What's your name?'.
cy.get('input[name="firstname"]').focused().then(($txt)=>{
            cy.get('[data-testid="undefined"]>.uiContextualLayer uiContextualLayerLeft>._5v-0 _53im>#js_18n').should('be.visible').and('contain',"What's your name?");
        });

But this is not working This is the pic that i am testing

Facebook sign up page

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can do something like this:

cy.get('[name="firstname"]').click()
cy.get('[name="lastname"]').click()
cy.get('[name="firstname"]').click() //triggers the error message
cy.contains('What\'s your name?').should('be.visible')
about 4 years ago · Juan Pablo Isaza Report

0

The popup is added to the end of the page after clicking the red icon.

cy.contains('div', 'First name')
  .parent()
  .next()    // red icon
  .click()
cy.contains('.uiContextualLayerPositioner', "What's you name?")
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!