fix timeouts

browsersteps-start-refactor
dgtlmoon 2 years ago
parent 9f56b45bd9
commit f87c96d295

@ -90,7 +90,7 @@ class steppable_browser_interface():
return return
elem = self.page.get_by_text(value) elem = self.page.get_by_text(value)
if elem.count(): if elem.count():
elem.first.click(delay=randint(200, 500)) elem.first.click(delay=randint(200, 500), timeout=3000)
def action_enter_text_in_field(self, selector, value): def action_enter_text_in_field(self, selector, value):
if not len(selector.strip()): if not len(selector.strip()):
@ -146,10 +146,10 @@ class steppable_browser_interface():
self.page.keyboard.press("PageDown", delay=randint(200, 500)) self.page.keyboard.press("PageDown", delay=randint(200, 500))
def action_check_checkbox(self, selector, value): def action_check_checkbox(self, selector, value):
self.page.locator(selector).check() self.page.locator(selector).check(timeout=1000)
def action_uncheck_checkbox(self, selector, value): def action_uncheck_checkbox(self, selector, value):
self.page.locator(selector).uncheck() self.page.locator(selector, timeout=1000).uncheck(timeout=1000)
# Responsible for maintaining a live 'context' with browserless # Responsible for maintaining a live 'context' with browserless

Loading…
Cancel
Save