selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[🚀 Feature]: Allow specifying a callable for the message argument in WebDriverWait.until / until_not.

Open moeyashi opened this issue 4 months ago • 1 comments

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}')

moeyashi avatar Oct 03 '24 01:10 moeyashi