Esempio n. 1
0
 def test_mainpage_15(self):
     wait = WebDriverWait(self.driver, 10)
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Click on instagram icon (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.instagram_icon)))
     element.click()
     # Check if the Sefora's instagram page was opened
     element = wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_instagram)))
     assert element.is_displayed(
     ), "ERROR. Sephora's Instagram page wasn't opened."
     # Click back button on browser
     main.browser_back_button()
     # Click on youtube icon (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.youtube_icon)))
     element.click()
     # Check if the Sefora's youtube page was opened
     wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_youtube)))
     assert self.driver.title == "Sephora - YouTube", "ERROR. Sephoria's Youtube page wasn't opened."
Esempio n. 2
0
 def test_mainpage_13(self):
     wait = WebDriverWait(self.driver, 10)
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Click on "Sephora Global Sites" link (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable(
             (By.XPATH, MainPage.sephora_global_link)))
     element.click()
     # Verify if the right page was opened
     element = wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_sephora_global)))
     assert element.is_displayed(
     ), "ERROR. 'Sephora Global Sites' page wasn't opened."
     # Click back button on browser
     main.browser_back_button()
     # Click on "Sephoria" link (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.sephoria_link)))
     element.click()
     time.sleep(1)
     # Go to next windows, and verify if the right page was opened
     window_after = self.driver.window_handles[1]
     self.driver.switch_to.window(window_after)
     assert self.driver.title == "Sephoria House of Beauty | Buy Your Tickets Here!", "ERROR. 'Sephoria' page wasn't opened."
Esempio n. 3
0
 def test_mainpage_14(self):
     wait = WebDriverWait(self.driver, 10)
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Click on facebook icon (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.facebook_icon)))
     element.click()
     # Check if the Sefora's facebook page was opened
     element = wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_facebook)))
     assert element.is_displayed(
     ), "ERROR. Sephora's Facebook page wasn't opened."
     # Click back button on browser
     main.browser_back_button()
     # Click on twitter icon (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.twitter_icon)))
     element.click()
     # Check if the Sefora's twitter page opened
     wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_twitter)))
     assert self.driver.title == "Sephora (@Sephora) | Twitter", "ERROR. Sephoria's Twitter page wasn't opened."
Esempio n. 4
0
 def test_mainpage_16(self):
     wait = WebDriverWait(self.driver, 10)
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Click on "Terms of Use" (bottom of the page)
     element = wait.until(EC.element_to_be_clickable((By.XPATH, MainPage.terms_use_link)))
     element.click()
     # Verify if the right page was opened
     element = wait.until(EC.presence_of_element_located((By.XPATH, MainPage.verify_terms_use)))
     assert element.is_displayed(), "ERROR. Sephora's Instagram page wasn't opened."
     # Click back button on browser
     main.browser_back_button()
     # Click on "Privacy Policy" link
     element = wait.until(EC.element_to_be_clickable((By.XPATH, MainPage.privacy_policy_link)))
     element.click()
     # Verify if the right page was opened
     element = wait.until(EC.presence_of_element_located((By.XPATH, MainPage.verify_privacy_policy)))
     assert element.is_displayed(), "ERROR. Sephoria's Youtube page wasn't opened."
Esempio n. 5
0
 def test_mainpage_12(self):
     wait = WebDriverWait(self.driver, 10)
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Click on "Affiliates" link (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.affiliates_link)))
     element.click()
     # Verify if the right page was opened
     element = wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_affiliates)))
     assert element.is_displayed(
     ), "ERROR. 'Affiliates' page wasn't opened."
     # Click back button on browser
     main.browser_back_button()
     # Click on "Supply Chain Transparency" link (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.supply_chain_link)))
     element.click()
     # Verify if the right page was opened
     element = wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_supply_chain)))
     assert element.is_displayed(
     ), "ERROR. 'Supply Chain Transparency' page wasn't opened."
     # Click back button on browser
     main.browser_back_button()
     # Click on "Sitemap" link (bottom of the page)
     element = wait.until(
         EC.element_to_be_clickable((By.XPATH, MainPage.sitemap_link)))
     element.click()
     # Verify if the right page was opened
     element = wait.until(
         EC.presence_of_element_located(
             (By.XPATH, MainPage.verify_sitemap)))
     assert element.is_displayed(), "ERROR. 'Sitemap' page wasn't opened."