Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

349
Views
¿Cómo superar el problema de desplazamiento en Cypress?

Me enfrenté al problema de desplazamiento de Cypress con respecto al acceso a un submenú que aparecía después de pasar el mouse sobre el elemento del menú principal. El error es This element is not visible because it has CSS property: position: fixed and it's being covered by another element: . Traté de usar las soluciones alternativas recomendadas por Cypress https://docs.cypress.io/api/commands/hover#Workarounds pero no tuve éxito. La documentación de Cypress dice "Usar .trigger() solo afectará los eventos en JavaScript y no activará ningún efecto en CSS", así que traté de cambiar la propiedad CSS del elemento al principio y luego usé el comando .trigger:

 cy.get('.header-module--subMenu--1TF98.header-module--menuLevel2--2QGyh').eq(0).invoke('attr', 'style', 'position: absolute'); cy.get('.header-module--subMenu--1TF98.header-module--menuLevel2--2QGyh').eq(0).should('have.attr', 'style', 'position: absolute'); cy.get('.header-module--subMenu--1TF98.header-module--menuLevel2--2QGyh').eq(0).invoke('show'); cy.get('.header-module--subMenu--1TF98.header-module--menuLevel2--2QGyh').eq(0).trigger('mouseover');

Pero no funcionó. Independientemente, tengo la confirmación expected <ul.header-module--subMenu--1TF98.header-module--menuLevel2--2QGyh> to have attribute style with the value **position: absolute** Tengo el mismo error en la final paso This element <ul.header-module--subMenu--1TF98.header-module--menuLevel2--2QGyh> is not visible because it has CSS property: **position: fixed** and it's being covered by another element: . ¿Cómo puedo acceder al submenú oculto sin usar el argumento { force: true } ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Es posible que algo esté mal con el selector, ya que establece la position: absolute y la confirma, pero el mensaje aún hace referencia a la position: fixed .

Suponiendo que el selector esté bien, es posible que pueda activar el efecto "mostrar" con .realHover() de cypress-real-events .

Utiliza el protocolo Chrome Devtools para automatizar las herramientas de desarrollo de Chrome (solo para el navegador Chrome).

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!