Exemplo n.º 1
0
    def test_client_delete(self):
        '''删除客户'''

        lp = ClientPage(self.driver)
        lp.client_server()
        actual_a = lp.delete()
        print(actual_a)
        self.assertIn("删除成功", actual_a)
Exemplo n.º 2
0
 def test_client_search(self):
     '''查询客户'''
     #实例化客户page
     cname = '李白白0001'
     value = 'name'
     cp = ClientPage(self.driver)
     cp.client_inlet()  # 点击导航栏入口
     ret_search = cp.search(cname, value)  #查询
     self.assertEqual(cname, ret_search)
Exemplo n.º 3
0
 def test_flow_client(self):  #主流程
     ac2 = ClientPage(self.driver)
     res2 = ac2.add_client("9149")  #添加客户
     time.sleep(2)
     cc = ClientPage(self.driver)
     res = cc.cat_client()  #查看客户
     time.sleep(2)
     vim = ClientPage(self.driver)
     res3 = vim.edit_client("9159")  #编辑客户
Exemplo n.º 4
0
 def test_create_client(self):
     '''创建客户'''
     #实例化登录page,先进行登录,再创建客户
     lp = LoginPage(self.driver)
     file_path = r'E:\PyCharm2020(64bit)\py_workspace\crm_auto\data\data_text.txt'
     data = get_txt(file_path, 2)  # [[],[]]模式获取用户名密码
     u_name = data[0][0]
     password = data[0][1]
     actual = lp.login(u_name, password)  # 调用login page的login方法
     #实例化客户page
     cname = '王baibai'
     cp = ClientPage(self.driver)
     ret1 = cp.client(cname)
Exemplo n.º 5
0
 def test_view_client(self):
     '''查看指定客户的详情信息'''
     cname = '陈晓晓'
     value = 'name'
     cp = ClientPage(self.driver)
     cp.client_inlet()
     cp.search(cname, value)
     ret = cp.view_client_info()
     cp.exit_system()
     self.assertEqual(cname, ret)
Exemplo n.º 6
0
 def test_create_client(self):
     '''创建客户'''
     #实例化客户page
     cname = '王八0001'
     value = 'name'
     d_name = 'admin'
     cp = ClientPage(self.driver)
     cp.client_inlet()  # 点击导航栏入口
     cp.create_client_butt()
     cp.client_not_ret(cname, d_name)
     ret_search = cp.search(cname,value) #查询
     print(ret_search)
     self.assertEqual(cname, ret_search)
Exemplo n.º 7
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.º 8
0
 def test_clue_client_busniess1(self):
     '''新建线索,转化为客户——同时创建商机'''
     #添加线索
     contact = 'du先生008'
     addclue = SwitchCluePage(self.driver)  # 实例化AddCluePage
     text = addclue.ele_addclue(contact)  # 实例化AddCluePage的ele_addclue方法
     #线索转换-点击转换
     addclue.ele_switch()
     # 实例化客户page
     cname = '王八十0001'
     d_name = 'admin'
     bname = 'lily009'
     cp = ClientPage(self.driver)
     cp.client_not_ret(cname, d_name, sj='1')
     busy = BusinessPage(self.driver)
     busy.business_edit_flow(0, bname, '233002')
     ret = busy.search_business(bname)
     self.assertEqual(bname, ret)
Exemplo n.º 9
0
 def test_client_busniess1(self):
     '''新建客户——同时创建商机'''
     # 实例化客户page
     cname = '王jiu九'
     value = 'name'
     d_name = 'admin'
     bname = '2e2e2e20001'
     cp = ClientPage(self.driver)
     cp.client_inlet()  # 点击导航栏入口
     cp.create_client_butt()
     cp.client_not_ret(cname, d_name, sj='1')
     busy = BusinessPage(self.driver)
     busy.business_edit_flow(0, bname, '233001')
Exemplo n.º 10
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.º 11
0
 def test_edit_client(self):
     '''编辑客户'''
     vim = ClientPage(self.driver)
     res3 = vim.edit_client("9539")
     self.assertIn("客户编辑成功", res3)
Exemplo n.º 12
0
 def test_client_look(self):
     '''查看客户'''
     lp = ClientPage(self.driver)
     lp.client_server()
     lp.check()
Exemplo n.º 13
0
 def test_clew_add(self):
     #添加客户
     lp = ClientPage(self.driver)
     actual = lp.add("alitax22x", "621601", "niannian")
     print(actual)
     self.assertIn("添加客户成功", actual)
Exemplo n.º 14
0
    def test_client_compile(self):
        '''修改客户'''

        lp = ClientPage(self.driver)
        lp.client_server()
        lp.modification()
Exemplo n.º 15
0
 def test_catclient(self):
     '''查看客户'''
     caclient = ClientPage(self.driver)
     res = caclient.cat_client()
     self.assertEqual("分享", res)
Exemplo n.º 16
0
 def test_addclient_in(self):
     ''''添加客户放入客户池'''
     addclient = ClientPage(self.driver)
     res1 = addclient.add_client("9537")
     self.assertIn("添加客户成功", res1)
Exemplo n.º 17
0
 def test_addclient_notin(self):
     '''添加客户不放入客户池'''
     ac2 = ClientPage(self.driver)
     res2 = ac2.add_client("9538", 1)
     self.assertIn("添加客户成功", res2)