fix: 'Action' as regular Exception
This commit is contained in:
@@ -10,8 +10,7 @@ from selenium.webdriver.support.wait import WebDriverWait
|
||||
from selenium.common.exceptions import StaleElementReferenceException, TimeoutException
|
||||
|
||||
driver: WebDriver|None = None
|
||||
attempts, timeout, interval = int(), float(), float()
|
||||
identity = ''.join(random.choices(string.ascii_uppercase + string.digits, k=8))
|
||||
attempts, timeout, interval, identity = int(), float(), float(), None
|
||||
|
||||
def until(condition: typing.Callable[[WebDriver], bool], watch=True):
|
||||
try:
|
||||
@@ -70,7 +69,8 @@ def click(selector: str|WebElement, wait=True, condition=False):
|
||||
except: break
|
||||
|
||||
def setup(a: WebDriver, b: int, c: float, d: float):
|
||||
global driver, attempts, timeout, interval
|
||||
global identity, driver, attempts, timeout, interval
|
||||
identity = ''.join(random.choices(string.ascii_uppercase + string.digits, k=8))
|
||||
driver = a
|
||||
attempts = b
|
||||
timeout = c
|
||||
|
||||
Reference in New Issue
Block a user