def Navigate_to_Sports_Book(self):
         LoginpageActions.Login_to_Mainpage(self)
         MainpageActions.Access_to_AllSportGames_Page(self)
         # Wait the page loads
         wait_page_load = EC.element_to_be_clickable((By.XPATH, AllSportGamesElement.sports_book))
         WebDriverWait(self.driver, 20).until(wait_page_load)
         print("<li>" + "Click on Sports Book" + "</li>" + "<br>")
         self.driver.find_element_by_xpath(AllSportGamesElement.sports_book).click()
 def test_TC_AllSportGames_02_Access_to_AllSportGames_BeforeLogin(self):
     print("<b> Expected Results: Navigated to Login Page after clicking on All Sport Games without valid login. </b>" + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Access_to_AllSportGames_Page(self)
     # Assert
     # for i in range(1, 2, 1):
     for j in range(1, 5, 1):
         wait_page_load = EC.presence_of_element_located((By.XPATH, "/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/p"))
         WebDriverWait(self.driver, 10).until(wait_page_load)
     game_title = self.driver.find_element_by_xpath("/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/p").text
     print("<li>" + "Click on All Live Games in the list: " + game_title + "</li>" + "<br>")
     wait_page_load = EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/img"))
     WebDriverWait(self.driver, 10).until(wait_page_load)
     games = self.driver.find_element_by_xpath("/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/img").click()
     MainpageActions.Assert_Navigated_to_LoginPage(self)
 def test_TC_AllSportGames_01_Access_to_AllSportGames_AfterLogin(self):
     print("<b> Expected Results: Quick Transfer modal dialog is displayed. </b>" + "<br>")
     LoginpageActions.Login_to_Mainpage(self)
     MainpageActions.Access_to_AllSportGames_Page(self)
     # for i in range(1, 2, 1):
     for j in range(1, 5, 1):
         wait_page_load = EC.presence_of_element_located((By.XPATH, "/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/p"))
         WebDriverWait(self.driver, 10).until(wait_page_load)
     game_title = self.driver.find_element_by_xpath("/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/p").text
     print("<li>" + "Click on All Live Games in the list: " + game_title + "</li>" + "<br>")
     wait_page_load = EC.element_to_be_clickable((By.XPATH, "/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/img"))
     WebDriverWait(self.driver, 10).until(wait_page_load)
     games = self.driver.find_element_by_xpath("/html/body/div/div/div/div[2]/div[2]/div/div[2]/ul/li[" + str(MainData.loopranallsport) + "]/a/img").click()
     # Assert
     AllSportGamesActions.Assert_Quick_Transfer_Modal_Dialog(self)
Example #4
0
 def TC_Main_06_Navigate_to_All_Sport_Games_Page(self):
     print("<b> Expected Results: Navigated to All Sport Games page. </b>" +
           "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Access_to_AllSportGames_Page(self)