Code Monkey home page Code Monkey logo

Comments (6)

DesignByOnyx avatar DesignByOnyx commented on May 19, 2024 3

This is something that I've run into as well. I was waiting until someone else had the same issue before submitting a PR. Would you mind adding this code to your "cypress/support/commands.js" file and see if it solves your problem:

Cypress.Commands.overwrite('shadowClick', (originalFn, subject, options) => {
	Cypress.log({
		name: 'shadowClick',
	});

	subject.click();
});

from cypress-shadow-dom.

atobatele avatar atobatele commented on May 19, 2024 1

This is something that I've run into as well. I was waiting until someone else had the same issue before submitting a PR. Would you mind adding this code to your "cypress/support/commands.js" file and see if it solves your problem:

Cypress.Commands.overwrite('shadowClick', (originalFn, subject, options) => {
	Cypress.log({
		name: 'shadowClick',
	});

	subject.click();
});

This is what fixed it for me. Thank you so much @DesignByOnyx

from cypress-shadow-dom.

YorkCorreaLaRosa avatar YorkCorreaLaRosa commented on May 19, 2024

This is something that I've run into as well. I was waiting until someone else had the same issue before submitting a PR. Would you mind adding this code to your "cypress/support/commands.js" file and see if it solves your problem:

Cypress.Commands.overwrite('shadowClick', (originalFn, subject, options) => {
	Cypress.log({
		name: 'shadowClick',
	});

	subject.click();
});

Hi, I did what you told me by putting the code like that

command

But, the result is the same.. =(

result

I do not know what else to do? I'm suddenly doing something wrong?
Sorry for my bad english. I hope you can help me.

from cypress-shadow-dom.

DesignByOnyx avatar DesignByOnyx commented on May 19, 2024

Can you validate that the code I gave you is working? Can you put a console.log('ShadowClick', subject) in there and make sure that function is being called and that subject has a length. Also, what version of cypress-shadow-dom are you using? npm list cypress-shadow-dom

from cypress-shadow-dom.

zd6515843 avatar zd6515843 commented on May 19, 2024

@York6666 I met the same issue as you, do you find any way to work later?
and i also tried the code from @DesignByOnyx part, but i did not see the overwrite shadowClick was called.

from cypress-shadow-dom.

zd6515843 avatar zd6515843 commented on May 19, 2024

Can you validate that the code I gave you is working? Can you put a console.log('ShadowClick', subject) in there and make sure that function is being called and that subject has a length. Also, what version of cypress-shadow-dom are you using? npm list cypress-shadow-dom

@DesignByOnyx my version as below
-- [email protected]

from cypress-shadow-dom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.