Exemplo n.º 1
0
    def test_business_all(self):
        '''新增线索-添加客户-查看客户-新增商机-修改商机-合同'''

        cp = CluePage(self.driver)
        result1 = cp.clue_add('阿里公司', '李女士')
        self.assertIn('添加成功', result1)
        '''添加客户'''
        lp = ClientPage(self.driver)
        result2 = lp.add("张三999", "621601", "niannian")
        self.assertIn("添加客户成功", result2)
        '''查看客户'''
        lp.client_server()
        lp.check()
        '''新增商机'''
        bg = BusinessPage(self.driver)
        result3 = bg.business_add('好商机A', '100000')
        self.assertIn('添加商机成功', result3)
        '''修改商机'''
        bp = BusinessPage(self.driver)
        result4 = bp.business_update()
        self.assertIn("修改商机信息成功", result4)
        '''合同'''
        cp = ContractPage(self.driver)
        date, result5 = cp.contract("2020-07-22", "2020-08-23", "100",
                                    "2021-07-02")
        self.assertEqual(date, result5)
Exemplo n.º 2
0
    def test_client(self):
        '''新增客户-查看客户--删除'''

        lp = ClientPage(self.driver)
        actual = lp.add("lisa8832188", "621601", "niannian")
        print(actual)
        self.assertIn("添加客户成功", actual)

        lp.check()
        lp.modification()
        actual_result_delete = lp.delete()
        print(actual_result_delete)
        self.assertIn("删除成功", actual_result_delete)
Exemplo n.º 3
0
 def test_clew_add(self):
     #添加客户
     lp = ClientPage(self.driver)
     actual = lp.add("alitax22x", "621601", "niannian")
     print(actual)
     self.assertIn("添加客户成功", actual)