Beispiel #1
0
    def test_Loginvalid(self):
        driver = self.driver
        driver.get(Config.URL)
        loginpg = Loginpage(driver)
        Homepg = Homepage(driver)

        for r in range(2, rows + 1):
            username = XLUtils.readData(path, "Sheet1", r, 1)
            password = XLUtils.readData(path, "Sheet1", r, 2)
            loginpg.enterusername(username)
            loginpg.enterpassword(password)
            loginpg.SubmitButton()
            time.sleep(9)
            driver.save_screenshot(
                "C:/Users/Anupam/PycharmProjects/WebAppAutomation/TestUtility/homepage.png"
            )
            if driver.title == "Find a Flight: Mercury Tours:":
                print("Test passed")
                XLUtils.writeData(path, "Sheet1", r, 3, "Test passed")
                #Userc=username
                #PassC=password
                Homepg.click_Signoff()
            else:
                print("Test failed")
                XLUtils.writeData(path, "Sheet1", r, 3, "Test failed")

        time.sleep(10)
Beispiel #2
0
    def test_flightsearch(self):

        global driver, home
        driver = self.driver
        home = Homepage(driver)
        home.Select_Flight()
        home.Retrive_All_Flights()
        driver.implicitly_wait(30)
Beispiel #3
0
 def test_002Search(self):
     global neredenText
     global nereyeText
     neredenText = "istanbul"
     nereyeText = "izmir"
     driver = self.driver
     Search = Homepage(driver)
     Search.search_City(neredenText, nereyeText)
Beispiel #4
0
 def test_004Ucuza_Bilet_Bul_Button_click(self):
     driver = self.driver
     ucuza = Homepage(driver)
     ucuza.ucuza_bilet_bul_button_click()
     time.sleep(2)
     arama_url = driver.current_url
     self.assertIn("{}-{}".format(neredenText,
                                  nereyeText), self.driver.current_url,
                   "Arama Sonucu Yanlış Link = {}".format(arama_url))
Beispiel #5
0
    def test_003Search(self):
        driver = self.driver
        Search = Homepage(driver)
        Search.searchProduct("samsung")  ## search Samsung.
        time.sleep(2)

        try:
            driver.find_element_by_xpath(Locators.noResultCheck_xpath)
        except NoSuchElementException:
            print("Search Results Exist.")
            return True
        return False
Beispiel #6
0
 def setUpClass(cls):
     cls.driver = webdriver.Chrome(
     )  ## path : Scripts/Geckodriver.exe copied.
     cls.driver.implicitly_wait(10)
     cls.driver.maximize_window()
     cls.driver.delete_all_cookies(
     )  #cookielerden dolayı bazı formlar dolu geldiği için siliyoruz.
     cls.home = Homepage(cls.driver)
Beispiel #7
0
 def testUrl(self):
     hp = Homepage(self.driver)
     hp.Opelink()
     time.sleep(3)
Beispiel #8
0
 def test_008Hover(self):  ## Go to Wishlist.
     time.sleep(3)
     driver = self.driver
     hoverList = Homepage(driver)
     hoverList.hoverList()
     hoverList.clickWishlist()
Beispiel #9
0
 def test_0020SignInButton(self):
     driver = self.driver
     SignInBtn = Homepage(driver)
     SignInBtn.clickSignIn()  ## Home-> SignInButton
     assert "ap/signin" in driver.current_url  ## Check Url
 def test008_GoToWishlist(self):
     driver = self.driver
     wishlist = Homepage(driver)
     wishlist.clickWishlist()
     assert "istek-listelerim" in driver.current_url
 def test004_Search(self):
     driver = self.driver
     search = Homepage(driver)
     search.searchProd()
     assert "samsung" in driver.current_url
 def test002_clickLogin(self):
     driver = self.driver
     signIn = Homepage(driver)
     signIn.clickSignIn()
     assert "giris-yap" in driver.current_url
 def test001_OpenPage(self):
     driver = self.driver
     Home = Homepage(driver)
     Home.getHomepage()
     assert "n11" in driver.title
Beispiel #14
0
 def test_003Date_Click(self):
     driver = self.driver
     date = Homepage(driver)
     date.date_Click()
    def test_homepage(self):
        driver = self.driver
        driver.get(Globalvariable.baseURL)
        login = Loginpage(driver)
        login.enter_email(Globalvariable.username)
        login.enter_password(Globalvariable.password)
        login.clicklogin()
        time.sleep(5)
        homepage = Homepage(driver)
        homepage.click_home()
        time.sleep(5)
        page_title1 = self.driver.title
        if page_title1 == "PHPTRAVELS | Travel Technology Partner":
            assert True
        else:
            assert False

        homepage.click_hotels()
        time.sleep(5)
        page_title2 = self.driver.title
        if page_title2 == "PHPTRAVELS | Travel Technology Partner":
            assert True
        else:
            assert False
        time.sleep(5)

        homepage.click_tours()
        page_title3 = self.driver.title
        if page_title3 == "PHPTRAVELS | Travel Technology Partner":
            assert True
        else:
            assert False
        time.sleep(5)

        homepage.click_flights()
        page_title3 = self.driver.title
        if page_title3 == "PHPTRAVELS | Travel Technology Partner":
            assert True
        else:
            assert False
        time.sleep(5)

        homepage.click_tour_thailand()
        page_title4 = self.driver.title

        if page_title4 == "6 Days Around Thailand":
            assert True
        else:
            assert False