How is it possible to unpack tuples with Selenium WebDriverWait?
Why this code is not working?
class Test:
def __init__(self, driver):
self.driver = driver
editprofile_button = (By.XPATH, "//android.widget.TextView[@text=\"Edit profile info\"]")
def profile_page_should_be_visible(self):
wait = WebDriverWait(self.driver,20)
wait.until(EC.presence_of_element_located(*Test.editprofile_button))
assert self.driver.find_element(*Test.editprofile_button).is_displayed()
But if I write the function like this, then everything is working with WebdriverWait:
def profile_page_should_be_visible(self):
wait = WebDriverWait(self.driver,20)
wait.until(EC.presence_of_element_located((By.XPATH, "//android.widget.TextView[@text=\"Edit profile info\"]")))
assert self.driver.find_element(*Test.editprofile_button).is_displayed()