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

117
Views
Cypress - Finding input element id when it as a space in it?

I'm trying to identify an input element within an iframe (I'm using the "cypress-iframe" library to account for this) by its ID so I can type in it but the input is "Mobile Phone" and Cypress throws an error when trying to look for it. There are other single word ids in the form that I can type in to just fine (so it's not the iframe thankfully) but I'm wondering if there was a way to format the call to account for the space, current code below:

export function typeMobilePhone() {
    cy.wait(4000)
    cy.frameLoaded('#podium-modal')
    cy
        .iframe('#podium-modal')
        .find('#Mobile Phone')
        .click()
        .type('123456789')
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As @Naren says, the space is killing your selector.

You can use an alternate selector (assuming you cannot change the id)

cy.iframe('#podium-modal')
  .find('[id="Mobile Phone"]')
  .type('123456789')
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!