selenium
selenium copied to clipboard
[🚀 Feature]: Allow specifying a callable for the message argument in WebDriverWait.until / until_not.
Feature and motivation
I would like to construct an error message using the driver
in the message
argument of WebDriverWait.until / until_not
when an error occurs.
Currently, it is necessary to use a try-catch structure, but if the message
argument could accept a function, I believe it would allow for more readable code.
Usage example
WebDriverWait(driver, 10).until(lambda x: x.find_element(By.ID, "someId"), lambda x: f'Message: {x.current_url}')