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
In each class that inherits from DysonModule, is still required to have a decent chunk of code.
fromdyson.errorsimportDysonErrorfromdyson.utils.moduleimportDysonModulefromdyson.utils.selectorsimporttranslate_selectorclassClickModule(DysonModule):
defrun(self, webdriver, params):
""" Click an element on the page :param webdriver: :param params: :return: """iflen(params.keys()) >0:
selector, strategy=translate_selector(params, webdriver)
ifselectorandstrategy:
returnselector(strategy).click()
else:
raiseDysonError("You need to specify a valid selector to click")
else:
raiseDysonError("You need to specify an argument to \"click\"")
we could optimize this by creating some sort of get_param('param') and have it throw errors or return. we could even have it default . get_param('param', 'default')
The text was updated successfully, but these errors were encountered:
In each class that inherits from DysonModule, is still required to have a decent chunk of code.
we could optimize this by creating some sort of
get_param('param')
and have it throw errors or return. we could even have it default .get_param('param', 'default')
The text was updated successfully, but these errors were encountered: