Example #1
0
 def test_mainpage_19(self):
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Mouseover "SHOP" dropdown box
     # Click on "FRAGRANCE" link box
     shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
     actions = action_chains.ActionChains(self.driver)
     actions.move_to_element(shop).perform()
     fragrance = self.driver.find_element_by_xpath(MainPage.fragrance_link)
     actions.move_to_element(fragrance).perform()
     fragrance.click()
     # Verify if the right page opened
     assert self.driver.title == "Fragrance | Sephora", "ERROR. Fragrance page wasn't opened."
     # Go back to the main page
     main.click_main_page()
     # Mouseover "SHOP" dropdown box
     # Click "BATH & BODY" link box
     shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
     bath_body = self.driver.find_element_by_xpath(MainPage.bath_body_link)
     actions = action_chains.ActionChains(self.driver)
     actions.move_to_element(shop).perform()
     actions.move_to_element(bath_body).perform()
     bath_body.click()
     # Verify if the right page opened
     assert self.driver.title == "Bath Products & Body Products | Sephora", "ERROR. Bath Products & Body Products page wasn't opened."
Example #2
0
 def test_mainpage_18(self):
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Mouseover "SHOP" dropdown box
     # Click on "HAIR" link box
     actions = action_chains.ActionChains(self.driver)
     shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
     actions.move_to_element(shop).perform()
     hair = self.driver.find_element_by_xpath(MainPage.hair_link)
     actions.move_to_element(hair).perform()
     hair.click()
     # Verify if the right page was opened
     assert self.driver.title == "Hair Care Products | Sephora", "ERROR. Hair Care Products page wasn't opened."
     # Go back to the main page
     main.click_main_page()
     # Mouseover "SHOP" dropdown box
     # Click "TOOLS & BRUSHES" link box
     actions = action_chains.ActionChains(self.driver)
     shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
     actions.move_to_element(shop).perform()
     tools_brushes = self.driver.find_element_by_xpath(
         MainPage.tools_brushes_link)
     actions.move_to_element(tools_brushes).perform()
     tools_brushes.click()
     # Verify if the right page was opened
     assert self.driver.title == "Makeup Tools, Beauty Tools & Makeup Accessories | Sephora", "ERROR. Makeup Tools, Beauty Tools & Makeup Accessories page wasn't opened."
Example #3
0
    def test_mainpage_17(self):
        wait = WebDriverWait(self.driver, 10)
        main = MainPage(self.driver)
        main.click_close_x_icon()
        # Mouseover "SHOP" dropdown box
        # Click on "MAKEUP" link box
        shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
        makeup = self.driver.find_element_by_xpath(MainPage.makeup_link)
        actions = action_chains.ActionChains(self.driver)
        actions.move_to_element(shop).perform()
        actions.move_to_element(makeup).perform()
        makeup.click()
#        actions.move_to_element(shop).move_to_element(makeup).click().perform()
        # Verify if the right page was opened
        assert self.driver.title == "Makeup | Sephora", "ERROR. Makeup page wasn't opened."
        # Go back to the main page
        main.click_main_page()
        # Mouseover "SHOP" dropdown box
        # Click "SKINCARE" link box
        shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
        skincare = self.driver.find_element_by_xpath(MainPage.skincare_link)
        actions = action_chains.ActionChains(self.driver)
        actions.move_to_element(shop).perform()
        actions.move_to_element(skincare).perform()
        skincare.click()
        # Verify if the right page was opened
        assert self.driver.title == "Skincare Products | Sephora", "ERROR. Skincare page wasn't opened."
Example #4
0
 def test_mainpage_20(self):
     main = MainPage(self.driver)
     main.click_close_x_icon()
     # Mouseover "SHOP" dropdown box
     # Click on "GIFTS" link box
     shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
     actions = action_chains.ActionChains(self.driver)
     actions.move_to_element(shop).perform()
     gifts_link = self.driver.find_element_by_xpath(MainPage.gifts_link)
     actions.move_to_element(gifts_link).perform()
     gifts_link.click()
     # Verify if the right page was opened
     assert self.driver.title == "Best Beauty Gifts in 2019 | Sephora", "ERROR. Best Beauty Gifts page wasn't opened."
     # Go to the main page
     main.click_main_page()
     # Mouseover "SHOP" dropdown box
     # Click "SALE" link box
     shop = self.driver.find_element_by_xpath(MainPage.mouseover_shop)
     sale_link = self.driver.find_element_by_xpath(MainPage.sale_link)
     actions = action_chains.ActionChains(self.driver)
     actions.move_to_element(shop).perform()
     actions.move_to_element(sale_link).perform()
     sale_link.click()
     # Verify if the right page was opened
     assert self.driver.title == "Makeup Sale | Beauty Sale | Sephora", "ERROR. Makeup Sale | Beauty Sale page wasn't opened."