Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

180
Visualizações
Timed out retrying after 4000ms: Cannot read properties of undefined (reading 'toLowerCase')

I am receiving a strange error when I am trying to perform an assertion via cypress and just need some assistance. All I am trying to do is display that a selection is added into the bet slip.

The error I am receiving is:

get Object{5}

assert expected { Object (0, length) } to be visible

Timed out retrying after 4000ms: Cannot read properties of undefined (reading 'toLowerCase')

This happens in this step:

And ("The number of elements is {string}", (number) => {
  cy.get(elements.selection()).should('be.visible').should('have.length', number);
})

The element it points to is:

class Elements {

    selection(){
        return cy.get('.__selection')
    }
}

export default Elements

   
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You've doubled up on the cy.get()

cy.get(elements.selection()).should('be.visible')

selection(){
  return cy.get('.__selection')
}

Either

elements.selection().should('be.visible')

selection(){
  return cy.get('.__selection')
}

Or

cy.get(elements.selection()).should('be.visible')

selection(){
  return '.__selection'
}
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda