I tried locating the input field by using the below code, but it I keep getting an error as undefined. It looks to me like this is a legacy website with framesets nested within each other that makes it more complicated to enter or type into the username field using Cypress.
import 'cypress-iframe'
describe('Suite Name', () => {
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})
it.only('FrameSetExample', () => {
cy.visit("https://epay.dallascityhall.com/bdisu/public/frameset_top_html.jsp")
cy.get("html > frameset > frame:nth-child(2)").then(($ele) => {
var ifele = $ele.contents().find("#logonuidfield")
cy.wrap(ifele).type("sample username")
})
})
})
When I try to use the following method "Frame Loaded" it opens the webpage and detects the frame successfully so stuck on what else to attempt to allow this to work properly.
it.only('FrameSetExample', () => {
cy.visit("https://epay.dallascityhall.com/bdisu/public/frameset_top_html.jsp")
cy.frameLoaded("html > frameset > frame:nth-child(2)")
})