Exemple #1
0
 def render_body(self, body, timeout=0):
     self._driver.execute_script(
         'setTimeout(function() { document.getElementsByTagName("body")[0].innerHTML = "'
         + body.replace('\n', ' ').replace('"', '\\"')
         + '";}, '
         + str(convert_sec_to_ms(timeout))
         + ');'
     )
     return self
Exemple #2
0
 def execute_script_with_timeout(self, script, timeout):
     self._driver.execute_script(
         "setTimeout(function() { "
         + script.replace("\n", " ")
         + " }, "
         + str(convert_sec_to_ms(timeout))
         + ");"
     )
     return self
Exemple #3
0
 def execute_script_with_timeout(self, script, timeout):
     self._driver.execute_script('setTimeout(function() { ' +
                                 script.replace('\n', ' ') + ' }, ' +
                                 str(convert_sec_to_ms(timeout)) + ');')
     return self