Comments (6)
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.
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.
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
But, the result is the same.. =(
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.
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.
@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.
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 thatsubject
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)
- [Bug] HOT 2
- [Bug] shadowTrigger fails with options parameter HOT 7
- [Bug] TypeError: Cannot read property 'shadowRoot' of undefined HOT 7
- [Bug] - cannot find items in light dom of host elements HOT 4
- [Bug] shadowContains does not retry if the item is not found
- [Bug] - retry-ability with dynamically added elements is not working HOT 1
- [Feature] add comprehensive testing suite
- [Feature] - add support for aliasing
- [Feature] - override $.contains to work with shadow trees
- shadowFind works with cypress runner but doesn't work when run in the command line HOT 1
- [Feature] .shadowContains should accept RegEx HOT 1
- [Feature] - shadowType accept special characters HOT 4
- [Bug] Chaining .should throws an error. HOT 3
- [Feature] Add support to mimic cy.check and cy.select
- Cypress shadow dom Not working headless
- shadowEq method enhancement HOT 1
- [Feature] add typescript definition file HOT 1
- Cypress 4.x.x support? HOT 1
- [Feature] Allow the retrieval of regular DOM elements from nodes that contain a Shadow DOM
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cypress-shadow-dom.