I am writing a code that will check the names of the dropbox menus. With the first one it works fine, but for the others it shows me this error, even thought the dropbox is visible. I didn't change the code, so it's the same for all menus. This error appears:
AssertionError Timed out retrying after 5000ms: expected '' to be 'visible' This element is not visible because it has CSS property: display: none
My code:
it('Check the dropdown menu Onboarding', function () {
cy.visit('http://localhost:25000/', { timeout: 300000 })
cy.wait(10000)
cy.get('.dijitReset.dijitInline.dijitMenuItemLabel.dijitMenuItem:eq(1)').click()
cy.contains('Smartcard zuweisen').should('be.visible')
cy.contains('Prim?re Smartcard zuweisen').should('be.visible')
cy.contains('Prim?re Karte drucken und zuweisen').should('be.visible')
cy.get('.dijitReset.dijitInline.dijitMenuItemLabel.dijitMenuItem:eq(1)').click()
})
it('Check the dropdown menu Kartenverwaltung', function () {
//cy.visit('http://localhost:25000/', { timeout: 300000 })
cy.wait(10000)
cy.get('.dijitReset.dijitInline.dijitMenuItemLabel.dijitMenuItem:eq(2)').click()
//cy.contains('Kartenverwaltung').should('be.visible')
cy.contains('Aktive und deaktivierte Karten')
cy.contains('Karteninventar').should('be.visible')
cy.contains('Personenübersicht').should('be.visible')
cy.contains('Follow You Printing').should('be.visible')
cy.contains('Staging-Tabelle').should('be.visible')
cy.contains('Ausstehende Karten').should('be.visible')
cy.contains('Gesperrte Karten').should('be.visible')
cy.contains('Karte zurückgeben').should('be.visible')
})
The first function Onboarding works. From the second function Kartenverwaltung appears the error. What could be the problem?
First 3 tr and their children: