def test_TC_AllSlotGames_02_Access_to_AllSlotGames_BeforeLogin(self): print( "<b> Expected Results: Navigated to Login Page after clicking on All Slot Games without valid login. </b>" + "<br>") MainpageActions.Access_to_Mainpage(self) MainpageActions.Access_to_AllSlotGames_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.loopranallslot) + "]/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.loopranallslot) + "]/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.loopranallslot) + "]/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.loopranallslot) + "]/a/img").click() MainpageActions.Assert_Navigated_to_LoginPage(self)
def test_TC_AllSlotGames_01_Access_to_AllSlotGames_AfterLogin(self): print( "<b> Expected Results: Quick Transfer modal dialog is displayed. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) MainpageActions.Access_to_AllSlotGames_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.loopranallslot) + "]/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.loopranallslot) + "]/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.loopranallslot) + "]/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.loopranallslot) + "]/a/img").click() # Assert AllSlotGamesActions.Assert_Quick_Transfer_Modal_Dialog(self)
def Navigate_to_JinFuXingYun(self): MainpageActions.Access_to_AllSlotGames_Page(self) # Wait the page loads wait_page_load = EC.presence_of_element_located( (By.XPATH, AllSlotGamesElement.jinfuxingyun)) WebDriverWait(self.driver, 20).until(wait_page_load) print("<li>" + "Click on JinFuXingYun" + "</li>" + "<br>") self.driver.find_element_by_xpath( AllSlotGamesElement.jinfuxingyun).click()
def Navigate_to_RespinMania(self): MainpageActions.Access_to_AllSlotGames_Page(self) # Wait the page loads wait_page_load = EC.element_to_be_clickable( (By.XPATH, AllSlotGamesElement.respinmania)) WebDriverWait(self.driver, 20).until(wait_page_load) print("<li>" + "Click on RespinMania" + "</li>" + "<br>") self.driver.find_element_by_xpath( AllSlotGamesElement.respinmania).click()
def TC_Main_04_Navigate_to_All_Slot_Games_Page(self): print("<b> Expected Results: Navigated to All Slot Games page. </b>" + "<br>") MainpageActions.Access_to_Mainpage(self) MainpageActions.Access_to_AllSlotGames_Page(self)