|
|
@ -75,15 +75,13 @@ class steppable_browser_interface():
|
|
|
|
def action_goto_url(self, url, optional_value):
|
|
|
|
def action_goto_url(self, url, optional_value):
|
|
|
|
# self.page.set_viewport_size({"width": 1280, "height": 5000})
|
|
|
|
# self.page.set_viewport_size({"width": 1280, "height": 5000})
|
|
|
|
now = time.time()
|
|
|
|
now = time.time()
|
|
|
|
response = self.page.goto(url, timeout=0, wait_until='domcontentloaded')
|
|
|
|
response = self.page.goto(url, timeout=0, wait_until='commit')
|
|
|
|
print("Time to goto URL", time.time() - now)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Wait_until = commit
|
|
|
|
# Wait_until = commit
|
|
|
|
# - `'commit'` - consider operation to be finished when network response is received and the document started loading.
|
|
|
|
# - `'commit'` - consider operation to be finished when network response is received and the document started loading.
|
|
|
|
# Better to not use any smarts from Playwright and just wait an arbitrary number of seconds
|
|
|
|
# Better to not use any smarts from Playwright and just wait an arbitrary number of seconds
|
|
|
|
# This seemed to solve nearly all 'TimeoutErrors'
|
|
|
|
# This seemed to solve nearly all 'TimeoutErrors'
|
|
|
|
extra_wait = int(os.getenv("WEBDRIVER_DELAY_BEFORE_CONTENT_READY", 5))
|
|
|
|
print("Time to goto URL ", time.time() - now)
|
|
|
|
self.page.wait_for_timeout(extra_wait * 1000)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def action_click_element_containing_text(self, selector=None, value=''):
|
|
|
|
def action_click_element_containing_text(self, selector=None, value=''):
|
|
|
|
if not len(value.strip()):
|
|
|
|
if not len(value.strip()):
|
|
|
|