Exemplo n.º 1
0
 def test_TC_Main_20_Access_to_TransferProcessDetails(self):
     print(
         "<b> Expected Results: Able to access to Transfer Process details. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on About Us" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.about_us_link).click()
     print("<li>" + "Click on Transfer Process from the side bar" +
           "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.moneytransfer_process_button).click()
     print("<li>" + "Click on Transfer Process from the tab" + "</li>" +
           "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.moneytransfer_process_tab).click()
     # Wait page loads
     wait_page_load = EC.presence_of_element_located(
         (By.XPATH, MainpageElement.moneytransfer_process_tab_details))
     WebDriverWait(self.driver, 10).until(wait_page_load)
     alipay_details = self.driver.find_element_by_xpath(
         MainpageElement.moneytransfer_process_tab_details).text
     self.assertNotEqual(alipay_details, "",
                         "Unable to read Transfer Process Details")
Exemplo n.º 2
0
 def test_TC_Main_14_Access_to_OnlineBankingDetails(self):
     print(
         "<b> Expected Results: Able to access to Online Banking details. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on About Us" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.about_us_link).click()
     print("<li>" + "Click on Deposit Process from the side bar" + "</li>" +
           "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.deposit_process_button).click()
     print("<li>" + "Click on Online Banking from the tab" + "</li>" +
           "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.online_banking_tab).click()
     # Wait page loads
     wait_page_load = EC.presence_of_element_located(
         (By.XPATH, MainpageElement.online_banking_details))
     WebDriverWait(self.driver, 10).until(wait_page_load)
     onlinebanking_details = self.driver.find_element_by_xpath(
         MainpageElement.online_banking_details).text
     self.assertNotEqual(onlinebanking_details, "",
                         "Unable to read Online Banking Details")
Exemplo n.º 3
0
 def test_TC_Main_25_Access_to_AccountPrivacyAgreementDetails(self):
     print(
         "<b> Expected Results: Able to access to Account Privacy Agreement details. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on About Us" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.about_us_link).click()
     print("<li>" + "Click on Account Security from the side bar" +
           "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.account_security_button).click()
     print("<li>" + "Click on Account Privacy and Agreement from the tab" +
           "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.user_privacy_agreement_tab).click()
     # Wait page loads
     wait_page_load = EC.presence_of_element_located(
         (By.XPATH, MainpageElement.user_privacy_agreement_details))
     WebDriverWait(self.driver, 10).until(wait_page_load)
     alipay_details = self.driver.find_element_by_xpath(
         MainpageElement.user_privacy_agreement_details).text
     self.assertNotEqual(
         alipay_details, "",
         "Unable to read Account Privacy and Agreement Details")
Exemplo n.º 4
0
 def test_TC_Main_04_Navigate_to_FAQ(self):
     print(
         "<b> Expected Results: Able to access to FAQ without breaking. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on FAQ" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(MainpageElement.faq_link).click()
     # Wait page loads
     wait_page_load = EC.presence_of_element_located(
         (By.XPATH, MainpageElement.bottom_link_title))
     WebDriverWait(self.driver, 20).until(wait_page_load)
     link_title = self.driver.find_element_by_xpath(
         MainpageElement.bottom_link_title).is_displayed()
     self.assertTrue(link_title, "User is not able to access to FAQ.")
Exemplo n.º 5
0
 def test_TC_ESportsSportsBook_01_Navigate_to_SportsBook_BeforeLogin(self):
     print(
         "<b> Expected Results: Login Reminder modal dialog is displayed when accessing Sports Book game without valid login. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     EsportspageActions.Access_to_E_Sports_Tab(self)
     EsportspageActions.Access_to_SportsBook_Page(self)
     EsportspageActions.Assert_Login_Reminder(self)
Exemplo n.º 6
0
 def test_TC_Main_03_Navigate_to_MobileBetting(self):
     print(
         "<b> Expected Results: Able to access to Mobile Betting without breaking. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on Mobile Betting" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.mobile_betting_link).click()
     # Wait page loads
     wait_page_load = EC.visibility_of_element_located(
         (By.CLASS_NAME, MainpageElement.mobile_betting_qr))
     WebDriverWait(self.driver, 20).until(wait_page_load)
     mobile_betting_qr = self.driver.find_element_by_class_name(
         MainpageElement.mobile_betting_qr).is_displayed()
     self.assertTrue(mobile_betting_qr,
                     "User is not able to access to Mobile Betting.")
Exemplo n.º 7
0
 def test_TC_Main_09_Access_to_FAQDetails(self):
     print("<b> Expected Results: Able to access to FAQ details. </b>" +
           "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on About Us" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.about_us_link).click()
     print("<li>" + "Click on FAQ from the side bar" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(MainpageElement.faq_button).click()
     # Wait page loads
     wait_page_load = EC.presence_of_element_located(
         (By.XPATH, MainpageElement.faq_details))
     WebDriverWait(self.driver, 10).until(wait_page_load)
     faq_details = self.driver.find_element_by_xpath(
         MainpageElement.faq_details).text
     self.assertNotEqual(faq_details, "", "Unable to read FAQ Details")
Exemplo n.º 8
0
 def test_TC_Main_02_Navigate_to_AboutUs(self):
     print(
         "<b> Expected Results: Able to access to About Us without breaking. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on About Us" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.about_us_link).click()
     # Wait page loads
     wait_page_load = EC.presence_of_element_located(
         (By.XPATH, MainpageElement.bottom_link_title))
     WebDriverWait(self.driver, 20).until(wait_page_load)
     # assert self.driver.find_element_by_css_selector(MainpageElement.bottom_link_title).text == "本地化".decode().encode('utf-8')
     link_title = self.driver.find_element_by_xpath(
         MainpageElement.bottom_link_title).is_displayed()
     # about_us = "关于我们".decode('utf-8')
     self.assertTrue(link_title, "User is not able to access to About Us.")
Exemplo n.º 9
0
 def test_TC_Main_11_Access_to_BasicTermsDetails(self):
     print(
         "<b> Expected Results: Able to access to Basic Terms details. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     MainpageActions.Scroll_to_Main_Page_Bottom(self)
     print("<li>" + "Click on About Us" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.about_us_link).click()
     print("<li>" + "Click on Basic Terms from the side bar" + "</li>" +
           "<br>")
     self.driver.find_element_by_xpath(
         MainpageElement.basic_term_button).click()
     # Wait page loads
     wait_page_load = EC.presence_of_element_located(
         (By.XPATH, MainpageElement.basic_term_details))
     WebDriverWait(self.driver, 10).until(wait_page_load)
     basicterms_details = self.driver.find_element_by_xpath(
         MainpageElement.basic_term_details).text
     self.assertNotEqual(basicterms_details, "",
                         "Unable to read Login and Registration Details")
Exemplo n.º 10
0
 def TC_LiveVideo_01_Navigate_to_LiveVideo_Page(self):
     print(
         "<b> Expected Results: Able to access to Live Video page without breaking. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     LiveVideopageActions.Access_to_LiveVideo_Page(self)
     # Wait page loads
     wait_page_load = EC.visibility_of_element_located(
         (By.XPATH, LiveVideoElement.live_video_game))
     WebDriverWait(self.driver, 20).until(wait_page_load)
     live_video_game = self.driver.find_element_by_xpath(
         LiveVideoElement.live_video_game).is_displayed()
     self.assertTrue(live_video_game,
                     "User is not able to access to Live Video Page.")
Exemplo n.º 11
0
 def test_TC_Main_07_Access_to_LatestAnnouncement(self):
     print(
         "<b> Expected Results: Able to access to the latest announcement via main page </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     print("<li>" + "Click on marquee announcement" + "</li>" + "<br>")
     self.driver.find_element_by_class_name(
         MainpageElement.marquee_announcement).click()
     # Wait page loads
     wait_announcement_load = EC.element_to_be_clickable(
         (By.CLASS_NAME, MainpageElement.marquee_announcement_modal))
     WebDriverWait(self.driver, 20).until(wait_announcement_load)
     announcement_modal = self.driver.find_element_by_class_name(
         MainpageElement.marquee_announcement_modal).is_displayed()
     self.assertTrue(announcement_modal,
                     "User is not able to access to Latest Announcement.")
Exemplo n.º 12
0
 def test_TC_BIG_01_Navigate_to_BigGaming_BeforeLogin(self):
     print(
         "<b> Expected Results: Login Reminder modal dialog is displayed when accessing Big Gaming game without valid login. </b>"
         + "<br>")
     MainpageActions.Access_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_Login_Reminder(self)
Exemplo n.º 13
0
 def TC_LiveVideo_02_Navigate_to_LiveVideoGame_BeforeLogin(self):
     print(
         "<b> Expected Results: Login Reminder modal dialog is displayed when accessing Live Video game without valid login. </b>"
         + "<br>")
     MainpageActions.Access_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()
     # Wait modal dialog load
     wait_page_load = EC.element_to_be_clickable(
         (By.CLASS_NAME, LiveVideoElement.login_reminder_confirm_button))
     WebDriverWait(self.driver, 20).until(wait_page_load)
     login_reminder_modal_dialog = self.driver.find_element_by_class_name(
         LiveVideoElement.login_reminder_confirm_button).is_displayed()
     self.assertTrue(login_reminder_modal_dialog,
                     "Login reminder is not displayed.")
Exemplo n.º 14
0
 def Login_to_Mainpage(self):
     MainpageActions.Access_to_Mainpage(self)
     # Login with registered username and password
     print("<li>" + "Insert Username: "******"</li>" +
           "<br>")
     self.driver.find_element_by_id(LogInElement.username_field).clear()
     self.driver.find_element_by_id(LogInElement.username_field).send_keys(
         LoginData.username)
     print("<li>" + "Insert Password: "******"</li>" +
           "<br>")
     self.driver.find_element_by_id(LogInElement.password_field).clear()
     self.driver.find_element_by_id(LogInElement.password_field).send_keys(
         LoginData.password)
     print("<li>" + "Click on Log in button" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(LogInElement.login_button).click()
     # Wait the page loads
     wait_main_page = EC.presence_of_element_located(
         (By.XPATH, LogInElement.account_name))
     WebDriverWait(self.driver, 20).until(wait_main_page)
     # Assert
     account_name = self.driver.find_element_by_xpath(
         LogInElement.account_name).text
     self.assertEqual(account_name, LoginData.username,
                      "User is not able to login to the account.")
Exemplo n.º 15
0
 def test_TC_DownloadCenter_01_Navigate_to_DownloadCenterPage(self):
     print(
         "<b> Expected Results: Able to access to download center page without breaking. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)
     DownloadCenterpageActions.Access_to_Download_Center(self)
Exemplo n.º 16
0
 def test_TC_SignUp_01_Sign_Up_New_User(self):
     print(
         "<b> Expected Results: Able to login with registered username and password. </b>"
         + "<br>")
     MainpageActions.Access_to_SignUp_Page(self)
     print("<li>" + "Insert Username: "******"</li>" + "<br>")
     self.driver.find_element_by_xpath(
         SignUppageElement.username_field).send_keys(
             SignUpData.new_username)
     print("<li>" + "Insert Password: "******"</li>" +
           "<br>")
     self.driver.find_element_by_xpath(
         SignUppageElement.password_field).send_keys(SignUpData.password)
     print("<li>" + "Insert Confirm Password: "******"</li>" + "<br>")
     self.driver.find_element_by_id(
         SignUppageElement.confirm_password_field).send_keys(
             SignUpData.confirm_password)
     print("<li>" + "Insert Mobile Phone: " + SignUpData.phone_number +
           "</li>" + "<br>")
     self.driver.find_element_by_id(
         SignUppageElement.mobile_phone_field).send_keys(
             SignUpData.phone_number)
     print("<li>" + "Insert Email: " + SignUpData.email + "</li>" + "<br>")
     self.driver.find_element_by_id(
         SignUppageElement.email_field).send_keys(SignUpData.email)
     print("<li>" + "Insert Invitation Code: " +
           SignUpData.invitation_code + "</li>" + "<br>")
     self.driver.find_element_by_id(
         SignUppageElement.invitation_code_field).send_keys(
             SignUpData.invitation_code)
     print("<li>" + "Click on Sign Up button" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(
         SignUppageElement.sign_up_button).click()
     # Wait till alert is present
     alert = WebDriverWait(self.driver, 20).until(EC.alert_is_present())
     # Switch the control to the Alert window
     registration_prompt = self.driver.switch_to.alert
     # Retrieve the message on the Alert window
     # prompt_message = registration_prompt.text
     # print("Alert shows following message: " + prompt_message + "<br>")
     # Click on the OK button (Accept)
     print("<li>" + "Click on OK button" + "</li>" + "<br>")
     registration_prompt.accept()
     self.driver.refresh()
     # Wait the page loads
     wait_main_page = EC.element_to_be_clickable(
         (By.CLASS_NAME,
          MainpageElement.announcement_modal_dialog_close_button))
     WebDriverWait(self.driver, 20).until(wait_main_page)
     dialog_shown = self.driver.find_element_by_class_name(
         MainpageElement.announcement_modal_dialog_close_button
     ).is_displayed()
     self.assertTrue(dialog_shown,
                     "Announcement is not shown after sign up.")
     # Close Announcement dialog box
     print("<li>" + "Close the Announcement modal dialog" + "</li>" +
           "<br>")
     self.driver.find_element_by_class_name(
         MainpageElement.announcement_modal_dialog_close_button).click()
     # Login with registered username and password
     print("<li>" + "Insert Username: "******"</li>" + "<br>")
     self.driver.find_element_by_id(LogInElement.username_field).send_keys(
         SignUpData.new_username)
     print("<li>" + "Insert Password: "******"</li>" +
           "<br>")
     self.driver.find_element_by_id(LogInElement.password_field).send_keys(
         SignUpData.password)
     print("<li>" + "Click on Log in button" + "</li>" + "<br>")
     self.driver.find_element_by_xpath(LogInElement.login_button).click()
     # Wait the page loads
     wait_main_page = EC.presence_of_element_located(
         (By.XPATH, LogInElement.account_name))
     WebDriverWait(self.driver, 20).until(wait_main_page)
     # Assert
     account_name = self.driver.find_element_by_xpath(
         LogInElement.account_name).text
     self.assertEqual(account_name, SignUpData.new_username,
                      "User is not able to login to the account.")
Exemplo n.º 17
0
 def test_TC_Main_01_Navigate_to_Main_Page(self):
     print(
         "<b> Expected Results: Able to access to main page without breaking. </b>"
         + "<br>")
     MainpageActions.Access_to_Mainpage(self)