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')
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')