Wrong Type Hint on some keywords. (`locator: Union[WebElement, None, str]`)
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.
René do you have a list of keywords you discovered that this affects?
Not at directly.
I remembered that it was more than one.
search for those which has None as type hint, but no default.
A quick search results in the following you should check.
- Get Table Cell
- Table Column Should Contain
- Table Footer Should Contain
- Table Header Should Contain
- Table Row Should Contain
- Table Should Contain
- Wait Until Element Contains
- Wait Until Element Does Not Contain
- Wait Until Element Is Enabled
- Wait Until Element Is Not Visible
- Wait Until Element Is Visible
- Wait Until Page Contains Element
- Wait Until Page Does Not Contain Element
- Capture Element Screenshot
But there may be more.
All those have None as type hint for locator but no None as default.
Danke schön René. I'll take a look