コード例 #1
0
 def test_yuyue_click(self):
     try:
         loginPage.LoginPage(self.driver).user_login(userName,passWord)
         time.sleep(2)
         homePage.HomePage(self.driver).yuyue_click()
         time.sleep(6)
         assert_equal(homePage.HomePage(self.driver).yuyue_page_title_text(),u'微预约')
         print u"成功进入微预约订单列表页!"
     except Exception,e:
         print e.message
コード例 #2
0
 def test_kaquan_click(self):
     try:
         loginPage.LoginPage(self.driver).user_login(userName,passWord)
         time.sleep(2)
         homePage.HomePage(self.driver).kaquan_click()
         time.sleep(6)
         assert_equal(homePage.HomePage(self.driver).kaquan_page_title_text(),u'核销卡券')
         print u'成功进入核销卡券页面!'
     except Exception,e:
         print e.message
コード例 #3
0
 def test_banlance_click(self):
     try:
         loginPage.LoginPage(self.driver).user_login(userName,passWord)
         time.sleep(2)
         homePage.HomePage(self.driver).banlance_click()
         time.sleep(6)
         if homePage.HomePage(self.driver).banlance_page_titie_text() == u'会员余额':
             print u'成功进入会员余额页面!'
     except Exception,e:
         print e.message
コード例 #4
0
 def testHomePage(self):
     # self.driver.open_notifications()
     # self.driver.back()
     # X = self.driver.get_window_size()['width']
     # Y = self.driver.get_window_size()['height']
     # print X,Y
     loginPage.LoginPage(self.driver).user_login(userName,passWord)
     time.sleep(2)
     homePage.HomePage(self.driver).homeCtvClick()
     homePage.HomePage(self.driver).homeTypeClick()
コード例 #5
0
ファイル: DockerTest.py プロジェクト: ValerieQA/docker
 def test_search_in_hub_docker(self):
     home_page = homePage.HomePage(self.driver)
     home_page.set_search_phrase(testdata.HomePageTestData.SEARCH_WORD)
     search_results_page = home_page.submit_search()
     assert constants.SearchResultsPageConstants.TEXT_SEARCH_RESULT in search_results_page.get_search_results(
     )
     print "Search results equal to: " + search_results_page.get_search_results(
     )
コード例 #6
0
 def testLogin(self):
     try:
         time.sleep(10)
         login.Login(self.driver).userLogin(userName,passWord)
         time.sleep(6)
         if homePage.HomePage(self.driver).messageText() == u'消息':
             print u'用户登录QQ成功!'
     except Exception,e:
         print e.message
コード例 #7
0
 def testHotelReservation(self):
     time.sleep(6)
     hotelReservation.HotelReservation(self.driver).closeButtonClick()
     time.sleep(2)
     loginPage.LoginPage(self.driver).user_login(userName, passWord)
     time.sleep(2)
     homePage.HomePage(self.driver).homeCtvClick()
     hotelReservation.HotelReservation(self.driver).hotelClick()
     time.sleep(3)
     hotelReservation.HotelReservation(self.driver).hotelDetailClick()
     time.sleep(2)
コード例 #8
0
ファイル: DockerTest.py プロジェクト: ValerieQA/docker
 def test_search_filter(self):
     home_page = homePage.HomePage(self.driver)
     filter_name = testdata.HomePageTestData.FILTER_WORD
     home_page.set_search_phrase(testdata.HomePageTestData.SEARCH_WORD)
     search_results_page = home_page.submit_search()
     filter_result = search_results_page.set_filter(filter_name)
     assert constants.SearchResultsPageConstants.TEXT_SEARCH_FILTER_RESULT in filter_result
     assert constants.SearchResultsPageConstants.TEXT_SEARCH_RESULT in search_results_page.get_search_results(
     )
     print "Search results equal to: " + search_results_page.get_search_results(
     )
コード例 #9
0
ファイル: DockerTest.py プロジェクト: ValerieQA/docker
 def test_unsuccessful_login(self):
     home_page = homePage.HomePage(self.driver)
     # open log in page
     log_in_page = home_page.click_log_in_button()
     # define identifier
     identifier = testdata.LogInPageTestData.IDENTIFIER_INVALID
     # set user identifier
     log_in_page.set_log_in_identifier(identifier)
     # define password
     password = testdata.LogInPageTestData.USER_PASSWORD
     # set user password
     log_in_page.set_log_in_password(password)
     # submit login
     home_user_page = log_in_page.click_log_in_button_expecting_failure()
     assert home_user_page == constants.LogInPageConstants.TEXT_MESSAGE_UNSUCCESSFUL_LOGIN
     print "You are NOT logged in"
コード例 #10
0
ファイル: DockerTest.py プロジェクト: ValerieQA/docker
 def test_successful_login(self):
     home_page = homePage.HomePage(self.driver)
     # open log in page
     log_in_page = home_page.click_log_in_button()
     # define identifier
     identifier = testdata.LogInPageTestData.IDENTIFIER_VALID
     # set user identifier
     log_in_page.set_log_in_identifier(identifier)
     # define password
     password = testdata.LogInPageTestData.USER_PASSWORD
     # set user password
     log_in_page.set_log_in_password(password)
     # submit login
     home_user_page = log_in_page.click_log_in_button()
     assert home_user_page.is_successful_log_in_message_shown()
     print "You are logged in"
コード例 #11
0
ファイル: DockerTest.py プロジェクト: ValerieQA/docker
 def test_sign_up(self):
     home_page = homePage.HomePage(self.driver)
     # define unique user identifier
     identifier = str(time.time()).replace('.', '')
     # set user identifier in the field
     home_page.set_sign_up_identifier(identifier)
     # define email basing on identifier
     email = identifier + testdata.HomePageTestData.EMAIL_DOMAIN
     # set user email in the field
     home_page.set_sign_up_email(email)
     # define password
     password = testdata.HomePageTestData.USER_PASSWORD
     # set user password in the field
     home_page.set_sign_up_password(password)
     # click Sign Up button
     home_page.click_sign_up_button()
     # verify successful sign up message
     assert home_page.is_successful_sign_up_message_shown()
コード例 #12
0
 def testTypeClick(self):
     time.sleep(8)
     homePage.HomePage(self.driver).closeClick()
     self.meishiClick()
     time.sleep(9)
コード例 #13
0
 def testMoiveListPageIconClick(self):
     time.sleep(2)
     homePage.HomePage(self.driver).openMovie()
     time.sleep(2)
     movieListPage.MovieListPage(self.driver).movieListPageIconClick()
     time.sleep(2)