From version 3.5.0 cypress does not click correctly on elements on the page in CI. Workaround is to pass in {force:true} as an argument, but that is not what I expect how it should work.
Perhaps relates to this bug https://github.com/cypress-io/cypress/issues/3388, which was actually solved in version 3.2.0
The same test passed in cypress version 3.4.1.
Click on element should should trigger the javascript function
Screenshot (v3.4.1)
Screenshot (v3.6.1)
AppCode
Testcode
Cypress.Commands.add('setFavoriteMarket',(zipcode)=>{
if(zipcode != ""){
cy.contains('Markt suchen')
.click()
.get('input#marktsearch_section').type(zipcode)
.get('#marktsearch_button').click()
.get('.jspPane > .result:nth-child(1) .details > .info a')
**.click()**
.getCookie('EDEKA_B2C').should('exist').then((c) => {
return(JSON.parse(JSON.parse(c.value)));
}).its('marketID').should('be.not.empty',{ timeout: 10000 })
.get('.o-offers-offer-categories__store-information-item:nth-child(2) p').as('storeAddress')
}
});>
3.5.0 and higher
Having the same issue starting with 3.5.0
does param {force:true} help? or not in this case?
Yes, I already mentioned that in the current behavior part of the bug description
Unfortunately we have to close this issue as there is not enough information to reproduce the problem. We need the HTML to run the test code against, so that we can run the error ourselves.
This does not mean that your issue is not happening - it just means that we do not have a path to move forward.
Also please try updating to the current version of Cypress as we've fixed several bugs.
Please comment in this issue with a reproducible example and we will reopen the issue. 馃檹
@jennifer-shehane I also experience this problem, tried with {force: true}, sometimes works if a put long enough of a wait before.
Yes, even force sometimes fails could someone help
If you're experiencing a bug similar to this in Cypress, please open a new issue or comment with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.