fdutils/selenium_util/__init__.py
def execute_script(self, script, will_return_value=False, wait_timeout=10, script_args=()):
        """ executes script and polls a local temporary variable to check its value """

        script = re.sub('^\s*(.+)[\n\s]*$', r'\1', script, flags=re.MULTILINE)  # shorten script str

        if will_return_value:
            script_var = 'window.__fdvar=undefined;window.__fdvar=' + script
            self.driver.execute_script(script_var)
            if not retry(wait_timeout, 1, retry_when=lambda x: x is True)(
                    self.driver.execute_script)("return (typeof window.__fdvar == 'undefined')"):
                val = self.driver.execute_script('return window.__fdvar')
                # clean/remove  variable
                try:
                    self.driver.execute_script('delete window.__fdvar')
                except Exception:
                    log.exception('problems deleting temp variable __fdvar in javascript')
                return val
        else:
            return self.driver.execute_script(script, *script_args)
 executes script and polls a local temporary variable to check its value 
executes script and polls a local temporary variable to check its value
executes script and polls a local temporary variable to check its value
def execute_script(self, script, will_return_value=False, wait_timeout=10, script_args=()):
        script = re.sub('^\s*(.+)[\n\s]*$', r'\1', script, flags=re.MULTILINE)  
        if will_return_value:
            script_var = 'window.__fdvar=undefined;window.__fdvar=' + script
            self.driver.execute_script(script_var)
            if not retry(wait_timeout, 1, retry_when=lambda x: x is True)(
                    self.driver.execute_script)("return (typeof window.__fdvar == 'undefined')"):
                val = self.driver.execute_script('return window.__fdvar')
                try:
                    self.driver.execute_script('delete window.__fdvar')
                except Exception:
                    log.exception('problems deleting temp variable __fdvar in javascript')
                return val
        else:
            return self.driver.execute_script(script, *script_args)
def execute_script ( self , script , will_return_value = False , wait_timeout = 10 , script_args = ( ) ) : script = re . sub ( '^\s*(.+)[\n\s]*$' , r'\1' , script , flags = re . MULTILINE ) if will_return_value : script_var = 'window.__fdvar=undefined;window.__fdvar=' + script self . driver . execute_script ( script_var ) if not retry ( wait_timeout , 1 , retry_when = lambda x : x is True ) ( self . driver . execute_script ) ( "return (typeof window.__fdvar == 'undefined')" ) : val = self . driver . execute_script ( 'return window.__fdvar' ) try : self . driver . execute_script ( 'delete window.__fdvar' ) except Exception : log . exception ( 'problems deleting temp variable __fdvar in javascript' ) return val else : return self . driver . execute_script ( script , * script_args )
executes script and polls a local temporary variable to check its value
executes script and polls a local temporary variable to check its value
""" executes script and polls a local temporary variable to check its value """ # shorten script str # clean/remove  variable
self
script
will_return_value
wait_timeout
script_args