Cypress: run commands from commandqueue

Created on 4 Mar 2019  路  9Comments  路  Source: cypress-io/cypress

I can add commands to the command queue with cy.get("button") - but could I trigger the last command from the queue without enabling debugger as suggested in #989

Most helpful comment

Interactive cypress would save me hours of tinkering,

All 9 comments

You may be wanting to use the undocumented cy.now() command - which basically behaves as a Promise and does not enqueue.

Method signature is:

cy.now(commandName, args)

So, for cy.get('button') it would be:

cy.now('get', 'button')

Hey @matti, did this answer your question?

waiting for my code monkeys to confirm this

Closing as resolved. Please comment if you are still having this issue and we will consider reopening.

interesting. commands like contain and type don't work through the now interface, but get and click do. Any place where I can find the list of working commands?

Yeah, this is a bit on why it's undocumented, because it gets weird. We never intended it to be public. You can see some uses of cy.now() in our own code: https://github.com/cypress-io/cypress/search?q=%22cy.now%22&unscoped_q=%22cy.now%22

Interactive cypress would save me hours of tinkering,

Interactive cypress would save me hours of tinkering,

agreed - cypress would be 10x better with this

Was this page helpful?
0 / 5 - 0 ratings