0

I have this function:

@wait_untill_clickable(.... how to pass path_by,actual_path,call to decorator .... )
    def execute_element_action(self, path_by, actual_path, callback, *callback_params, timeout=40):
        web_element = self.get_clickable_element(path_by, actual_path)
        run_callback(web_element, callback, callback_params)
def wait_untill_clickable(.. want to receive all execute_element_action params here..)

how can I achieve that - so the decorator will receive all the decorated arguments.I cant pass kwargs here since the values are not const- they are the parameters that the function receives

khelwood
  • 55,782
  • 14
  • 81
  • 108
MD10
  • 1,313
  • 3
  • 12
  • 35
  • Does this answer your question? [Decorators with parameters?](https://stackoverflow.com/questions/5929107/decorators-with-parameters) – b_c Mar 04 '20 at 22:31
  • unfortunately no, I understand I need to wrap the decorator with another one that get the args, but how can I achieve this here.. I to to send the args of the function- this is not the same as mentioned in the suggestions. – MD10 Mar 04 '20 at 22:56
  • Anyone can help with my example? – MD10 Mar 05 '20 at 17:44

0 Answers0