Exemplo n.º 1
0
 def testdocfeeFourFAndTwoF(self):
     driver = self.driver
     driver.get(self.url)
     eu = ElementUtil()
     ace = AddCostElement()
     addCost = AddCost()
     self._testMethodDoc = "增加DOCFEE,40F和20F费用"
     addCost.docfeeFourFAndTwoF(driver)
     # 断言
     eu.click(driver, 15, "增加DOCTAX费用", *ace.selElement)
     el = driver.find_element(*ace.selDateElement)
     el.send_keys(Keys.SPACE)
     eu.click(driver, 15, "增加DOCTAX费用", *ace.editElement)
     sleep(2)
     try:
         actualResult = driver.find_element_by_xpath(
             '//tbody/tr[4]/td[7]/div[1]//input').get_attribute('value')
         actualResult = int(actualResult)
         self.assertEqual(1000, actualResult)
     except ElementUtil as e:
         print(e)
Exemplo n.º 2
0
 def testFull(self):
     driver = self.driver
     driver.get(self.url)
     eu = ElementUtil()
     ace = AddCostElement()
     addCost = AddCost()
     self._testMethodDoc = "增加所有费用"
     addCost.full(driver)
     # 断言
     eu.click(driver, 15, "增加DOCTAX费用", *ace.selElement)
     el = driver.find_element(*ace.selDateElement)
     el.send_keys(Keys.SPACE)
     eu.click(driver, 15, "增加DOCTAX费用", *ace.editElement)
     sleep(5)
     try:
         # actualResult = eu.getElement(driver, 15, "增加DOCTAX费用", *ace.assertElement)
         # actualResult = actualResult.get_attribute('value')
         actualResult = driver.find_element_by_xpath(
             '//tbody/tr[5]/td[7]/div[1]//input').get_attribute('value')
         actualResult = int(actualResult)
         self.assertEqual(1000, actualResult)
     except ElementUtil as e:
         print(e)