I recently stumbled upon the e2e tool - Cypress.io. I'm currently doing a POC for the firm I work with for e2e testing of a react app. It has a hover over menu like most of the web apps have now.
An example :
URL : Fmovies
I was trying to click a menu item from this hover over but the test fails saying that the display
is set to none
.
In Selenium, we use the moveElement
approach to go to this element, and then do whatever we need to do. However, I'm failing to do so using Cypress.
Considering the current menu, I wrote this
it('goes to specific element in Genre',()=>{
cy.get('#menu').within(()=>{
cy.get('ul').within(()=>{
cy.contains('Family').click();
});
});
});