Initial situation:
Currently I have defined several test cases in our project, including login and logout within a Magento cloud environment.
I currently used the Chrome Webdriver for this test.
Python and the latest Selenium version.
Problem situation: I would like to check if a user is already registered.
What I have so far:
I'm currently checking whether a user wants to log in, and if it's the corresponding user "Frank" an assertion will be triggered.
But I believe that there are better solutions?
def test_login(self):
driver = self.driver
time.sleep(10)
driver.find_username = wait.until(EC.presence_of_element_located((By.XPATH,'//span[contains(text(), "Frank")]')))
assert find_username
The question
Are there more sensible solutions how to query this within Python/Selenium?