Why are return values accessible in Cypress if they cannot be used meaningfully? #28771
-
Hello everyone, I have a question regarding the return values in Cypress. In the Cypress documentation, it states: "You purposely cannot do anything useful with the return value from a command. Commands are enqueued and managed entirely behind the scenes." What I don't understand is why we are able to retrieve the return values if we cannot perform any useful actions with them? I could not find an answer to that in the documentation. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can use the return value by passing it from one command to the next (chaining commands) or by using something like |
Beta Was this translation helpful? Give feedback.
You can use the return value by passing it from one command to the next (chaining commands) or by using something like
.then()
and and using a closure