playwright-python
playwright-python copied to clipboard
[Feature] Add soft assertions
It would be nice to get the soft assertions that are available in node to be available in python.
https://playwright.dev/docs/test-assertions#soft-assertions
Thank you
Any idea how to implement this now? Try/Except with short timeout or is there a better way?
I am using pytest-check
for soft assertions. Adds another dependency to the project, but it works great.
I am using
pytest-check
for soft assertions. Adds another dependency to the project, but it works great.
I tried this one but couldn't get it working with expect(). Do you have an example of this?
Also +1 for soft assertions to be implemented in python as well as typescript.
I tried this one but couldn't get it working with expect(). Do you have an example of this?
It's a separate assertion mechanism, so you don't use it within expect()
. Pretty nice examples are included on the github page: https://github.com/okken/pytest-check
Also - you can mix assertions in your tests, so it's fine to use assert
, expect()
and check()
.