-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test commands in the Chrome DevTools console #6080
Comments
@mcelotti Using Issues in our GitHub repo are reserved for potential bugs or feature requests. This issue will be closed since it appears to be neither a bug nor a feature request. We recommend questions relating to how to use Cypress be asked in our community chat. Also try searching our existing GitHub issues, reading through our documentation, or searching Stack Overflow for relevant answers. |
Hi @jennifer-shehane thanks for the feedback. |
For every command, you shift the args by one and pass in the command name as the first argument. That's it. If there is .dblclick(position, options) Then the cy.now('dblclick', position, options) This applies to every single command. |
I was interested in more complex examples, for example I noticed that: cy.get('.action-email')
.type('[email protected]') ... translates to: cy.now('get', '.action-email')
.then(el => cy.now('type', el, '[email protected]')) So there's a bit of overhead to create these "translations" for debugging purposes. I tried also a custom command: Cypress.Commands.add('myCustomFunction', () => {
console.log('myCustomFunction');
}); ... as expected this translates to: cy.now('myCustomFunction') Thanks |
I really can't make any of these examples work. When I use: cy.now('get', '.action-email')
.then(el => cy.now('type', el, '[email protected]')) Nothing gets typed. I am able to get the element, see it on the console, I can use the result to set the value with jQuery, but the action itself |
Same here, @mauricioszabo. I can't get approach by @mcelotti to work.
Looks like the undocumented |
@willhlaw I've tried things like these but none of them are working for me
or
Thanks in advance |
Hi, I'm using cypress 3.8.1, how can I test my commands in the Chrome DevTools console?
I read about the cy.now details here #3636 even though that command is not available on the official docs https://docs.cypress.io/api/api/table-of-contents.html
Cypress.io is an awesome piece of software but testing the commands in a live session is really important to me. How can I achieve that?
Thanks
The text was updated successfully, but these errors were encountered: