SeleniumLibrary icon indicating copy to clipboard operation
SeleniumLibrary copied to clipboard

Wrong Type Hint on some keywords. (`locator: Union[WebElement, None, str]`)

Open Snooz82 opened this issue 1 year ago • 4 comments

Some keywords like Capture Element Screenshot do have a type hint, that allows WebElement, None and str. But the None is actually wrong. There are some keywords that actually would work with ${None} as a locator, but this one and others actually does not work and raises the error TypeError: expected string or bytes-like object, got 'NoneType'

Fix would be to just remove the None.

Snooz82 avatar Jan 17 '24 18:01 Snooz82