def test_common_query(self, info, expect):
     common_query_data = {'info': info}
     self.resource.common_query('..\\config\\base.conf', common_query_data)
     if Service.is_element_present(
             self.driver, By.CSS_SELECTOR,
             '#public-pool-table > thead:nth-child(1) > tr:nth-child(1) > th:nth-child(2) > div:nth-child(1)'
     ) or Service.is_element_present(self.driver, By.CSS_SELECTOR,
                                     '.no-records-found > td:nth-child(1)'):
         actual = 'query_successful'
     else:
         actual = 'query_failed'
     # 断言
     self.assertEqual(actual, expect)
 def test_query_resource(self, stime, etime, name, expect):
     query_resource_data = {'stime': stime, 'etime': etime, 'name': name}
     self.resource.query_resource('..\\config\\base.conf',
                                  query_resource_data)
     if Service.is_element_present(
             self.driver, By.CSS_SELECTOR,
             '#personal-table > tbody:nth-child(2) > tr:nth-child(1) > td:nth-child(15) > button:nth-child(2)'
     ) or Service.is_element_present(self.driver, By.CSS_SELECTOR,
                                     '.no-records-found > td:nth-child(1)'):
         actual = 'query_successful'
     else:
         actual = 'query_failed'
     # 断言
     self.assertEqual(actual, expect)
 def test_claim_resource(self):
     self.resource.claim_resource('..\\config\\base.conf')
     if Service.is_element_present(self.driver, By.CSS_SELECTOR,
                                   '.bootbox-body'):
         actual = 'claim_successful'
     else:
         actual = 'claim_failed'
     # 断言
     self.assertEqual(actual, 'claim_successful')
 def test_query_resource(self, name, phone, expect):
     add_resource_data = {'name': name, 'phone': phone}
     self.resource.add_resource('..\\config\\base.conf', add_resource_data)
     if Service.is_element_present(self.driver, By.CSS_SELECTOR,
                                   '.bootbox-body'):
         actual = 'add_successful'
     else:
         actual = 'add_failed'
     # 断言
     self.assertEqual(actual, expect)
 def test_look_resume(self):
     self.resource.look_resume('..\\config\\base.conf')
     if Service.is_element_present(
             self.driver, By.CSS_SELECTOR,
             '.modal-lg > form:nth-child(1) > div:nth-child(1) > div:nth-child(1) > h4:nth-child(2)'
     ):
         actual = 'query_successful'
     else:
         actual = 'query_failed'
     # 断言
     self.assertEqual(actual, 'query_successful')
 def test_abandon_resource(self):
     self.resource.abandon_resource('..\\config\\base.conf')
     if Service.is_element_present(
             self.driver, By.CSS_SELECTOR,
             '#personal-table > thead:nth-child(1) > tr:nth-child(1) > th:nth-child(2) > div:nth-child(1)'
     ):
         actual = 'abandon_successful'
     else:
         actual = 'abandon_failed'
     # 断言
     self.assertEqual(actual, 'abandon_successful')