Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
Website loading with timeout, get() does not get and click() the button

I have to press the button, select different currency and then check 24 hours exchange rates then see if it's positive. I am very new to cypress and trying to learn. I have read the cypress docs, did not manage to find guidance.

This is my code so far.

describe('dropdown select', () => {
    it('open dropdown', () => {
    cy.visit('https://spectrocoin.com/en/bitcoin-price-rates.html')
    cy.get('[class=" css-2b097c-container"]', { timeout: 20000 })
    cy.get('button').contains('USD').click()
    })
})

I added the timeout of 20seconds because it seemed as if the page does not load before finding the element. But it shows a completely different element when highlighted in Cypress environment than Chrome Inspect element environment.

What may be the issue of it not finding the correct button, then selecting, lets say, EUR currency in the dropdown.

Chrome screenshot

Current Status Screenshot

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can do something like this:

describe('dropdown select', () => {
  it('open dropdown', () => {
    cy.visit('https://spectrocoin.com/en/bitcoin-price-rates.html')
    Cypress.on('uncaught:exception', (err, runnable) => {
      return false
    }) //Ignore exceptions
    cy.get('[data-cy=accept-btn]').click()
    cy.get('#currency-select').should('be.visible').click()
  })
})

Instead of the class you can use the id #currency-select selector and this works.

Test Runner Screenshot: test runner execute

To ignore exceptions originating from your webpage you can use this. But your webpage shouldn't throw exceptions in the first place and that your test should be able to catch those in case if it does. So it's not a good practice to use this. Instead let your test fail and ask your developers to look into it and fix it.

Cypress.on('uncaught:exception', (err, runnable) => {
  return false
})
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda