Exemple #1
0
 def test_Android_2_injection(self):
     test_action = get_func_name()
     JPage = InjectionPage(self.driver)
     JPage.click_injection_button
     result = JPage.is_injection_success  # 验证点
     data1 = {}
     data1[test_action] = result["data"]
     Android_data["suite"].update(data1)
     self.assertTrue(result["result"], msg=result["Exception"])
Exemple #2
0
 def test_Android_3_payway(self):
     test_action = get_func_name()
     DPage = ChannelSelect(self.driver)
     DPage.select_money
     DPage.select_payway
     result = DPage.is_deposit_success
     data1 = {}
     data1[test_action] = result["data"]
     Android_data["suite"].update(data1)
     self.assertTrue(result["result"], msg=result["Exception"])
Exemple #3
0
 def test_Android_1_login(self):
     '''Android 登录测试'''
     test_action = get_func_name()
     Login = LoginPage(self.driver)
     Login.enter_portal
     Login.login(self.USERNAME, self.PWD)
     result = Login.is_login_success
     data1 = {}
     data1[test_action] = result["data"]
     Android_data["suite"].update(data1)
     self.assertTrue(result["result"], msg=result["Exception"])
Exemple #4
0
 def test_2_injection(self):
     '''注资页面跳转'''
     test_action = get_func_name()
     JPage = InjectionPage(self.driver)  # 网上存款页面类
     JPage.click_injection_button
     JPage.into_bank_page
     result = JPage.is_injection_success  # 验证点
     data1 = {}
     data1[test_action] = result["data"]
     Web_data["suite"].update(data1)
     self.assertTrue(result["result"], msg=result["Exception"])
Exemple #5
0
 def test_1_login(self):
     """ PC 登录测试"""
     test_action = get_func_name()  # 获取当前测试行为,以测试函数命名规范获取
     LoginPage = XSTZLoginPage(self.driver)  # 登录页面类
     LoginPage.login(self.USERNAME, self.PWD)  # 登录,输入用户名,密码
     result = LoginPage.is_login_success  # 验证点
     data1 = {}
     data1[test_action] = result["data"]
     Web_data["suite"].update(data1)
     self.assertTrue(result["result"])
     self.assertTrue(result["result"], msg=result["Exception"])
Exemple #6
0
    def test_3_payway(self, data):
        '''支付通道跳转'''
        money = Config().get("money")
        test_action = get_func_name()
        DPage = ChannelSelect(self.driver)  # 支付通道页面类
        payway = DPage.select_payway(data["P_number"])
        if data["PB_number"]:  # 判断支付通道是否存在银行注资通道
            msg = DPage.select_bank(data["PB_number"])  # 获取当前测试银行名字
            print(msg)
        DPage.input_money(money)  # 提交
        result = DPage.is_deposit_success(data["locator"],
                                          data["element"])  # 验证点
        time.sleep(1)
        data1 = {}
        print("当前测试通道:{}".format(payway))
        data1[test_action] = result["data"]

        Web_data["suite"].update(data1)
        self.assertTrue(result["result"], msg=result["Exception"])