Esempio n. 1
0
 def test_signin_32(self):
     wait = WebDriverWait(self.driver, 10)
     signin = SignIn(self.driver)
     # Click "Sign in" button
     signin.click_signin_button()
     time.sleep(1)
     # Enter a valid email account ([email protected])
     signin.set_email(self.email)
     # Click on "Next" button
     signin.click_next_button()
     time.sleep(1)
     # Enter a valid password (12345678)
     signin.set_password(self.password)
     # Click "Sign in" button
     signin.click_password_signin_button()
     time.sleep(1)
     # Click X button
     signin.click_x_button()
     # Click on "Your Account" dropdown menu
     signin.click_your_account()
     # Click on "Sign out" link
     signin.click_sign_out_link()
     # Click back arrow (on browser)
     signin.window_back_page()
     # Click on "Your Account" dropdown menu
     signin.click_your_account()
     # Click on "My Dashboard" link
     signin.click_my_dashboard_link()
     # Verify that clicking on browser back button after successful logout should not take User to logged in mode
     self.driver.get(signin.url)
     element = wait.until(EC.presence_of_element_located((By.XPATH, SignIn.signin_button)))
     assert element.is_displayed()
Esempio n. 2
0
 def test_signin_29(self):
     wait = WebDriverWait(self.driver, 10)
     signin = SignIn(self.driver)
     # Click "Sign in" button
     signin.click_signin_button()
     time.sleep(1)
     # Enter a valid email account ([email protected])
     signin.set_email(self.email)
     # Click on "Next" button
     signin.click_next_button()
     time.sleep(1)
     # Click "Sign in" button
     signin.click_password_signin_button()
     # Verify if user was successfully logged in
     element = wait.until(
         EC.presence_of_element_located((By.XPATH, SignIn.alert_message_2)))
     assert element.is_displayed()
Esempio n. 3
0
 def test_signin_26(self):
     signin = SignIn(self.driver)
     # Click "Sign in" button
     signin.click_signin_button()
     time.sleep(1)
     # Enter a valid email account ([email protected])
     signin.set_email(self.email)
     # Click on "Next" button
     signin.click_next_button()
     time.sleep(1)
     # Enter an invalid password (87654321)
     signin.set_password(self.password)
     # Click "Sign in" button
     signin.click_password_signin_button()
     time.sleep(1)
     # Verify if an error message appeared (The email and password combination you entered doesn't match.)
     element = self.driver.find_element_by_xpath(SignIn.alert_message_2)
     assert element.is_displayed()
Esempio n. 4
0
 def test_signin_34(self):
     wait = WebDriverWait(self.driver, 10)
     signin = SignIn(self.driver)
     # Click "Sign in" button
     signin.click_signin_button()
     time.sleep(1)
     # Enter a valid email account ([email protected])
     signin.set_email(self.email)
     # Click on "Next" button
     signin.click_next_button()
     time.sleep(1)
     # Enter a valid password (12345678)
     signin.set_password(self.password)
     signin.verify_password()
     # Click "Sign in" button
     signin.click_password_signin_button()
     # Verify if an error message appears (Enter your Booking.com password)
     element = wait.until(EC.presence_of_element_located((By.XPATH, SignIn.alert_message_2)))
     assert element.is_displayed()
Esempio n. 5
0
 def test_signin_42(self):
     wait = WebDriverWait(self.driver, 10)
     signin = SignIn(self.driver)
     # Click "Sign in" button
     signin.click_signin_button()
     time.sleep(1)
     # Enter two blank spaces before and after entering the valid email address ("  [email protected]  ")
     signin.set_email(self.email)
     # Click on "Next" button
     signin.click_next_button()
     time.sleep(1)
     # Enter a valid password ("12345678")
     signin.set_password(self.password)
     # Click "Sign in" button
     signin.click_password_signin_button()
     # Verify if user was logged in successfully
     element = wait.until(
         EC.presence_of_element_located(
             (By.XPATH, SignIn.verify_success_signin)))
     assert element.is_displayed()