You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of branching on condition if by_locator param is None,
class Element(BaseElement):
def __init__(self, by_locator=None, web_element=None):
self.parent = None
if by_locator is not None:
super(Element, self).__init__(by_locator=by_locator)
elif web_element is not None:
super(Element, self).__init__()
self.avatar.set_web_element(web_element)
else:
super(Element, self).__init__()
You can simply pass by_locator parameter (including None value) to super().init
(There are no overloaded methods (methods with different signatures) in python)
Example: JDI/web/selenium/elements/base/element.py Element.init method
Instead of branching on condition if by_locator param is None,
class Element(BaseElement):
You can simply pass by_locator parameter (including None value) to super().init
(There are no overloaded methods (methods with different signatures) in python)
`
def init(self, by_locator=None, web_element=None):
`
The text was updated successfully, but these errors were encountered: