def testFullQuery(self): driver = self.driver self._testMethodDoc = "全量检索" driver.get(self.url) QueryB().fullQuery(driver) #断言 actualResult = self.driver.find_element_by_xpath( '//td[text()="No data available"]').text self.assertEqual("No data available", actualResult)
def testStartDateGreaterEndDate(self): driver = self.driver self._testMethodDoc = "根据开始日期>结束日期检索" driver.get(self.url) QueryB().startDateGreaterEndDateQuery(driver) #断言 actualResult = self.driver.find_element_by_xpath( '//td[text()="No data available"]').text self.assertEqual("No data available", actualResult)
def testContainerNoFalseQuery(self): driver = self.driver self._testMethodDoc = "根据不存在的集装箱 NO检索" driver.get(self.url) QueryB().containerNoFalseQuery(driver) #断言 actualResult = self.driver.find_element_by_xpath( '//td[text()="No data available"]').text self.assertEqual("No data available", actualResult)
def testTransportQuery(self): driver = self.driver self._testMethodDoc = "根据输送形态检索" driver.get(self.url) QueryB().transportQuery(driver) try: sleep(2) actualResult = self.driver.find_element_by_xpath( '//div[@class="v-datatable__actions__pagination"]').text actualResult = str(actualResult)[7:] actualResult = int(actualResult) if actualResult != None: self.assertNotEqual(0, actualResult) except Exception as e: print(e)
def testdoNOContainerNOAndtransportBLEndDate(self): driver = self.driver self._testMethodDoc = "根据DONO,运输状态,BL结束日期和集装箱NO检索" driver.get(self.url) QueryB().doNOContainerNOAndtransportBLEDateQuery(driver) try: sleep(2) actualResult = self.driver.find_element_by_xpath( '//div[@class="v-datatable__actions__pagination"]').text actualResult = str(actualResult)[7:] actualResult = int(actualResult) if actualResult != None: self.assertNotEqual(0, actualResult) except Exception as e: print(e)