def TC_Login_08_Access_to_Betting_Record(self): print( "<b> Expected Results: Able to access to betting record page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Betting Record" + "</li>" + "<br>") self.driver.find_element_by_xpath( LogInElement.betting_record_link).click() # Assert LoginpageActions.Assert_Access_to_Linkpage(self)
def TC_Login_05_Access_to_Online_Deposit(self): print( "<b> Expected Results: Able to access to online deposit page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Online Deposit" + "</li>" + "<br>") self.driver.find_element_by_xpath( LogInElement.online_deposit_link).click() # Assert LoginpageActions.Assert_Access_to_Linkpage(self)
def TC_Login_03_Access_to_Announcement(self): print( "<b> Expected Results: Able to access to announcement page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Announcement" + "</li>" + "<br>") self.driver.find_element_by_xpath( LogInElement.notification_link).click() # Assert LoginpageActions.Assert_Access_to_Linkpage(self)
def TC_Login_04_Access_to_Member_Center(self): print( "<b> Expected Results: Able to access to member center page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Member Center" + "</li>" + "<br>") self.driver.find_element_by_xpath( LogInElement.member_center_link).click() # Assert LoginpageActions.Assert_Access_to_Linkpage(self)
def test_TC_Login_09_Access_to_Member_Agent(self): print( "<b> Expected Results: Able to access to member agent page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Member Agent" + "</li>" + "<br>") self.driver.find_element_by_xpath( LogInElement.member_agent_link).click() # Assert LoginpageActions.Assert_Access_to_Linkpage(self)
def TC_Login_06_Access_to_Online_Withdrawal(self): print( "<b> Expected Results: Able to access to online withdrawal page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Online Withdrawal" + "</li>" + "<br>") self.driver.find_element_by_xpath( LogInElement.online_withdrawal_link).click() # Assert LoginpageActions.Assert_Access_to_Linkpage(self)
def test_TC_ESportsSportsBook_03_Enter_Game(self): print("<b> Expected Results: Able to access to gaming page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) EsportspageActions.Access_to_E_Sports_Tab(self) EsportspageActions.Access_to_SportsBook_Page(self) EsportspageActions.Assert_Quick_Transfer(self) EsportspageActions.Enter_Game(self)
def test_TC_ESportsSportsBook_04_Quick_Transfer(self): print("<b> Expected Results: Able to perform quick transfer. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) EsportspageActions.Access_to_E_Sports_Tab(self) EsportspageActions.Access_to_SportsBook_Page(self) EsportspageActions.Assert_Quick_Transfer(self) EsportspageActions.Quick_Transfer(self)
def test_TC_ESportsSportsBook_02_Navigate_to_SportsBook_AfterLogin(self): print( "<b> Expected Results: Quick Transfer modal dialog is displayed when accessing Sports Book game with valid login. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) EsportspageActions.Access_to_E_Sports_Tab(self) EsportspageActions.Access_to_SportsBook_Page(self) EsportspageActions.Assert_Quick_Transfer(self)
def Access_to_Personal_Information(self): LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Announcement" + "</li>" + "<br>") self.driver.find_element_by_xpath(LogInElement.notification_link).click() print("<li>" + "Click on Personal Information" + "</li>" + "<br>") self.driver.find_element_by_xpath(UserElement.personal_information_link).click() # Wait page load wait_page_load = EC.presence_of_element_located((By.XPATH, UserElement.personal_information_element)) WebDriverWait(self.driver, 20).until(wait_page_load) page_loaded = self.driver.find_element_by_xpath(UserElement.personal_information_element).is_displayed() self.assertTrue(page_loaded, "User is not able to access to personal information.")
def Access_to_Betting_Record(self): LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Announcement" + "</li>" + "<br>") self.driver.find_element_by_xpath(LogInElement.notification_link).click() print("<li>" + "Click on Betting Record" + "</li>" + "<br>") self.driver.find_element_by_xpath(UserElement.betting_record_links).click() # Wait page load wait_page_load = EC.presence_of_element_located((By.XPATH, UserElement.betting_record_element)) WebDriverWait(self.driver, 20).until(wait_page_load) page_loaded = self.driver.find_element_by_xpath(UserElement.betting_record_element).is_displayed() self.assertTrue(page_loaded, "User is not able to access to Betting Record.")
def test_TC_LiveVideo_03_Navigate_to_LiveVideoGame_AfterLogin(self): print( "<b> Expected Results: Quick Transfer modal dialog is displayed when accessing Big Gaming game with valid login.. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) LiveVideopageActions.Access_to_LiveVideo_Page(self) game_title = self.driver.find_element_by_xpath( "/html/body/div/div/div/div[2]/div[2]/div/div[2]/div[" + str(LiveVideoData.loopranlivevideo_game_pg1) + "]/div/button/div/p").text print("<li>" + "Click on a Live Video Game in the list: " + str(LiveVideoData.loopranlivevideo_game_pg1) + "</li>" + "<br>") select_game = self.driver.find_element_by_xpath( "/html/body/div/div/div/div[2]/div[2]/div/div[2]/div[" + str(LiveVideoData.loopranlivevideo_game_pg1) + "]/div/button/div/p").click()
def TC_Login_02_Logout(self): print("<b> Expected Results: Login from the account. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) print("<li>" + "Click on Log Out button" + "</li>" + "<br>") self.driver.find_element_by_xpath(LogInElement.logout_button).click() print("<li>" + "Click on Confirm button" + "</li>" + "<br>") self.driver.find_element_by_xpath( LogInElement.logout_confirm_button).click() # Wait page load wait_page_load = EC.presence_of_element_located( (By.CLASS_NAME, MainpageElement.announcement_modal_dialog_close_button)) WebDriverWait(self.driver, 20).until(wait_page_load) logout_from_main = self.driver.find_element_by_class_name( MainpageElement.announcement_modal_dialog_close_button ).is_displayed() self.assertTrue(logout_from_main, "User is not able to logout from the account.")
def test_TC_BIG_04_Quick_Transfer(self): print("<b> Expected Results: Able to perform quick transfer. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) ElectronicGamepageActions.Access_to_ElectronicGame_Tab(self) ElectronicGamepageActions.Access_to_BigGaming_Page(self) game_position = self.driver.find_element_by_xpath( ElectronicGameElement.big_game) actions = ActionChains(self.driver) actions.move_to_element(game_position).perform() print("<li>" + "Click on a Big Gaming game in the list: " + str(ElectronicGameData.loopranbig) + "</li>" + "<br>") wait_page_load = EC.element_to_be_clickable( (By.XPATH, ElectronicGameElement.big_game)) WebDriverWait(self.driver, 10).until(wait_page_load) select_game = self.driver.find_element_by_xpath( ElectronicGameElement.big_game).click() ElectronicGamepageActions.Assert_Quick_Transfer(self) ElectronicGamepageActions.Quick_Transfer(self)
def test_TC_M8_03_Enter_Game(self): print("<b> Expected Results: Able to access to gaming page. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) ElectronicGamepageActions.Access_to_ElectronicGame_Tab(self) ElectronicGamepageActions.Access_to_M8Sports_Page(self) game_position = self.driver.find_element_by_xpath( ElectronicGameElement.m8sports_game) actions = ActionChains(self.driver) actions.move_to_element(game_position).perform() print("<li>" + "Click on a M8 Sports game in the list: " + str(ElectronicGameData.loopranm8) + "</li>" + "<br>") wait_page_load = EC.element_to_be_clickable( (By.XPATH, ElectronicGameElement.m8sports_game)) WebDriverWait(self.driver, 10).until(wait_page_load) select_game = self.driver.find_element_by_xpath( ElectronicGameElement.m8sports_game).click() ElectronicGamepageActions.Assert_Quick_Transfer(self) ElectronicGamepageActions.Enter_Game(self)
def test_TC_M8_02_Navigate_to_M8Sports_AfterLogin(self): print( "<b> Expected Results: Quick Transfer modal dialog is displayed when accessing M8 Sports game with valid login. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self) ElectronicGamepageActions.Access_to_ElectronicGame_Tab(self) ElectronicGamepageActions.Access_to_M8Sports_Page(self) game_position = self.driver.find_element_by_xpath( ElectronicGameElement.m8sports_game) actions = ActionChains(self.driver) actions.move_to_element(game_position).perform() print("<li>" + "Click on a M8 Sports game in the list: " + str(ElectronicGameData.loopranm8) + "</li>" + "<br>") wait_page_load = EC.element_to_be_clickable( (By.XPATH, ElectronicGameElement.m8sports_game)) WebDriverWait(self.driver, 10).until(wait_page_load) select_game = self.driver.find_element_by_xpath( ElectronicGameElement.m8sports_game).click() ElectronicGamepageActions.Assert_Quick_Transfer(self)
def TC_Login_01_Valid_Login(self): print( "<b> Expected Results: Login to Main Page with valid username and password. </b>" + "<br>") LoginpageActions.Login_to_Mainpage(self)