Ejemplo n.º 1
0
 def test_login(self):
     try:
         loginPage.LoginPage(self.driver).user_login(userName,passWord)
         time.sleep(2)
         assert_equal(loginPage.LoginPage(self.driver).home_title_text(),u'首页',msg='True')
         print u'登录成功!'
     except Exception,e:
         print e.message
Ejemplo n.º 2
0
 def test_logout(self):
     try:
         loginPage.LoginPage(self.driver).user_login(userName,passWord)
         time.sleep(2)
         loginPage.LoginPage(self.driver).user_loginout()
         time.sleep(2)
         if loginPage.LoginPage(self.driver).login_btn_text() == u'登录':
             print u'退出登录,成功返回登录页面!'
     except Exception,e:
         print e.message
 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
 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
 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
Ejemplo n.º 6
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()
Ejemplo n.º 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)