Esempio n. 1
0
 def test_008_check_enable_timepolicy(self):
     u"""Enable勾选(testlink_ID:3177)"""
     log.debug("008")
     tmp = TimePolicyBusiness(self.driver)
     #按照默认配置,新建一个时间策略
     tmp.new_timepolicy_default(0, u"时间策略1", "1", "1", "h")
     #判断页面上是否有Enable图标
     result = tmp.check_enbale_timepolicy()
     self.assertTrue(result), "check enable time policy, test fail!"
     print "check enable time policy, test pass!"
Esempio n. 2
0
 def test_009_check_disable_timepolicy(self):
     u"""Enable不勾选(testlink_ID:3178)"""
     log.debug("009")
     tmp = TimePolicyBusiness(self.driver)
     #编辑一个时间策略,点击Enable
     tmp.enable_disable_timepolicy(0)
     #判断页面上是否有Enable图标
     result = tmp.check_enbale_timepolicy()
     tmp.del_all_timepolicy()
     self.assertFalse(result), "check disable time policy, test fail!"
     print "check disable time policy, test pass!"
Esempio n. 3
0
 def test_045_check_webUI_change_config(self):
     u"""修改配置之后检查页面信息(testlink_ID:3201)"""
     log.debug("045")
     tmp = TimePolicyBusiness(self.driver)
     #修改客户端重连超时类型为每小时
     tmp.change_timeout_hourly(0)
     #获取页面所有标题
     result1 = tmp.get_titlediv()
     #判断页面上是否有Enable图标
     result2 = tmp.check_enbale_timepolicy()
     #删除所有的时间策略
     tmp.del_all_timepolicy()
     self.assertIn(u"时间策略1", result1)
     self.assertIn(u"每小时", result1)
     self.assertTrue(result2), "check time policy webUI after change config, test fail!"
     print "check time policy webUI after change config, test pass!"
Esempio n. 4
0
 def test_044_check_webUI(self):
     u"""检查页面信息(testlink_ID:3200)"""
     log.debug("044")
     #点击客户端菜单
     tmp1 = ClientsBusiness(self.driver)
     tmp1.clients_menu()
     #点击时间策略菜单
     tmp = TimePolicyBusiness(self.driver)
     tmp.timepolicy_menu()
     #获取页面所有标题
     result1 = tmp.get_titlediv()
     #判断页面上是否有Enable图标
     result2 = tmp.check_enbale_timepolicy()
     self.assertIn(u"时间策略1", result1)
     self.assertIn(u"根据时间", result1)
     self.assertIn("99999999d", result1)
     self.assertTrue(result2), "check time policy webUI, test fail!"
     print "check time policy webUI, test pass!"