Beispiel #1
0
 def checkSaleActiveExists(self,OfferCode):
     '''检查是否传入的营销活动是否存在'''
     loc_PackageList = (By.XPATH,'//*[@id="PackageListPart"]/div/ul/li[1]/div/div')
     packgeId = self.get(loc_PackageList,Type='text')
     logger.info('查询结果列表展示的营销包:' + packgeId)
     Assertion().assertIsNotNone(packgeId,msg='营销包不存在,终止执行!')   #先断言一下,如果不存在则直接终止测试
     return self.is_value_in_text(loc_PackageList,OfferCode)