You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
expect can take a custom message to display if the assertion fails. Would like the ability to optionally provide a function to construct and return the message.
Example
async def mesg(loc):
# create a useful error message based on the locator.
return fancy_message
await expect(loc, message=mesg)
Motivation
In cases where additional context is useful to explain the assertion failure, being able to construct this dynamically based on the locator in question would be useful.
Constructing the failure message beforehand isn't feasible since the locators may have changed while waiting.
The text was updated successfully, but these errors were encountered:
🚀 Feature Request
expect
can take a custom message to display if the assertion fails. Would like the ability to optionally provide a function to construct and return the message.Example
Motivation
In cases where additional context is useful to explain the assertion failure, being able to construct this dynamically based on the locator in question would be useful.
Constructing the failure message beforehand isn't feasible since the locators may have changed while waiting.
The text was updated successfully, but these errors were encountered: