-
First of all, amazing work! Any plans to incorporate static typing support with mypy? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @feslima! Thank you, and welcome to SeleniumBase discussions! ...
_type = type(selector) # First make sure the selector is a string
not_string = False
if not python3:
if _type is not str and _type is not unicode: # noqa: F821
not_string = True
else:
if _type is not str:
not_string = True
if not_string:
msg = "Expecting a selector of type: \"<class 'str'>\" (string)!"
raise Exception('Invalid selector type: "%s"\n%s' % (_type, msg))
... With all these in place, it's not necessary to add in additional type handling. And it wouldn't be possible either because SeleniumBase supports Python versions |
Beta Was this translation helpful? Give feedback.
Hello @feslima! Thank you, and welcome to SeleniumBase discussions!
SeleniumBase has its own system of type verification, such as demonstrated in the below code snippet, which processes all inputs of selectors for SeleniumBase methods:
With all these in place, it's not necessary to ad…