We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
cy.do
Intreactors have ability to read values from filters by using read function:
read
await read(TextField('Username'), 'value')
Or by calling filters
await TextField('Username').value()
But if we try to use it in cypress:
cy .do(TextField('Username').value()) .then(($value) => { /* $value is undefined */ })
We can't get value back and use it in our assertions.
The text was updated successfully, but these errors were encountered:
Couldn't you just do this?
cy .then(TextField('username').value()) .then(username => { /* ... */})
Sorry, something went wrong.
So there's no reason to use cy.do or cy.expect except to show a nice display name in cypress log? I thought the cy.do should be able to return value
cy.expect
I suppose we could, but isn't the point of do to do something imperative? cy.do(TextField().value()) isn't performing an action, it's reading a value.
do
cy.do(TextField().value())
No branches or pull requests
Intreactors have ability to read values from filters by using
read
function:Or by calling filters
But if we try to use it in cypress:
We can't get value back and use it in our assertions.
The text was updated successfully, but these errors were encountered: