示例#1
0
 def test_login_26(self):
     login = Login(self.driver)
     # Click "Sign In" link
     login.close_icon()
     login.click_signin()
     # Select "No, I am new to the website" radio button
     login.click_new_to_site()
     # Check if password field disappeared, if it's present => error
     element = self.driver.find_elements_by_xpath(Login.password_field)
     assert len(element) == 0, "ERROR. The password field didn't disappear."
示例#2
0
 def test_login_17(self):
     wait = WebDriverWait(self.driver, 10)
     login = Login(self.driver)
     # Click "Sign In" link
     login.close_icon()
     login.click_signin()
     # Enter valid email
     login.set_email_address(self.email_address)
     # Select "No, I am new to the website" radio button
     login.click_new_to_site()
     # Click "Continue" button
     login.click_continue()
     # Check if an error message appears, if no => error
     element = wait.until(EC.presence_of_element_located((By.XPATH, Login.alert_incorrect_pass)))
     assert element.is_displayed(), "ERROR. 'An account already exists' alert message doesn't appear."
示例#3
0
 def test_login_18(self):
     wait = WebDriverWait(self.driver, 10)
     login = Login(self.driver)
     # Click "Sign In" link
     login.close_icon()
     login.click_signin()
     # Enter an unregistered email
     login.set_email_address(self.email_address)
     # Select "No, I am new to the website"
     login.click_new_to_site()
     # Click "Continue" button
     login.click_continue()
     # Check if a registration form appeared, if no => error
     element = wait.until(
         EC.presence_of_element_located((By.XPATH, Login.register_sephora)))
     assert element.is_displayed(
     ), "ERROR. 'Register with Sephora' registration form doesn't appear."
示例#4
0
 def test_login_27(self):
     wait = WebDriverWait(self.driver, 10)
     login = Login(self.driver)
     # Click "Sign In" link
     login.close_icon()
     login.click_signin()
     # Select "No, I am new to the website" radio button
     login.click_new_to_site()
     # Check if password field disappeared, if it's present => error
     element = self.driver.find_elements_by_xpath(Login.password_field)
     assert len(element) == 0, "ERROR. The password field didn't disappear."
     # Select "Yes, I have a password"
     login.click_new_to_site()
     # Check if password field reappeared, if not =? error
     element = wait.until(
         EC.presence_of_element_located((By.XPATH, Login.password_field)))
     assert element.is_displayed(
     ), "ERROR. The password field didn't reappear."