cypress-plugin-snapshots icon indicating copy to clipboard operation
cypress-plugin-snapshots copied to clipboard

(bug) Failing to take Image Snap Shot of an Element

Open jkodi-215 opened this issue 4 years ago • 2 comments

Describe the bug Failing to take Image Snap Shot of an Element

To Reproduce in the test block cy.visit('/') cy.get('.form').click() cy.get('.header').toMatchImageSnapshot()

Expected behavior It should a image snap shot of that element

Actual behavior cy.screenshot() failed because it requires a DOM element.

The subject received was:

Object{}

The previous command that ran was:

cy.wrap()

All 3 subject validations failed on this subject.

Note: I am passing a DOM element

Desktop (please complete the following information):

  • OS: OSX
  • Cypress Version 4.9.0

jkodi-215 avatar Oct 22 '20 05:10 jkodi-215

I just started trying to use this project to compare plotly charts and to check for unexpected changes. I'm getting the same error.

craig-dae avatar Nov 18 '20 16:11 craig-dae

If you are using zepto, it may be a cypress issue https://github.com/cypress-io/cypress/issues/6529.

This stackoverflow post may solve your problem.

Ayase-252 avatar Dec 02 '20 09:12 Ayase-252