add method to retrieve har
parent
8d9ba4d663
commit
c19776568e
|
|
@ -31,6 +31,13 @@ def install_har_export_trigger(driver):
|
|||
return driver
|
||||
|
||||
|
||||
def har_data(self)
|
||||
return self.execute_async_script(
|
||||
"HAR.triggerExport().then(arguments[0]);"
|
||||
)
|
||||
|
||||
|
||||
|
||||
class Grattoir(object):
|
||||
def __enter__(self):
|
||||
self._driver = None
|
||||
|
|
@ -45,6 +52,7 @@ class Grattoir(object):
|
|||
o.binary = binary
|
||||
self._driver = firefox.webdriver.WebDriver(options=o)
|
||||
self._driver = install_har_export_trigger(self._driver)
|
||||
self._driver = har_data
|
||||
return self._driver
|
||||
|
||||
def __exit__(self, exc_type, exc_value, exc_tb):
|
||||
|
|
|
|||
Loading…
Reference in New Issue