#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

import datetime
from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "abnormal_apply"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.pay_id = dict_home['PayId']
        self.draw_back = dict_home['DrawBack']
        self.ref_pay = dict_home['RefusalPay']
        self.freeze = dict_home['Freeze']
        self.apply = dict_home['ApplyBtn']
Пример #2
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import Merchant

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(Merchant().read_path("xml", "counterfeit"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.pay_id = dict_home['PayId']
        self.query_btn = dict_home['QueryBtn']
        self.row = dict_home['Row']

    # ----- 页面操作 ----- #
    def input_pay_id(self, val):
        # 输入支付 ID
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "formal_query"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.pay_id = dict_home['PayId']

    # ----- 页面操作 ----- #
    def input_pay_id(self, val):
        # 输入支付 ID
        self.send_keys(self.pay_id, val)
Пример #4
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import Gateway

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(Gateway().read_path("xml", "home"))


class HomePage(basepage.Action):
    """
    支付网关首页
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'testpage', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        # 接口名称
        self.link = dict_home['Interface']

    # ----- 页面操作 ----- #
    def open(self, base_url, page_title):
        # 调用page中的_open打开链接
        self._open(base_url, page_title)
Пример #5
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

import datetime
from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "contract"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.mer_no = dict_home['MerNo']
        self.create = dict_home['Create']
        self.verify = dict_home['Verify']

    # ----- 页面操作 ----- #
    def input_mer_no(self, val):
Пример #6
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "mer_reg"))


class Register(basepage.Action):
    """
    注册页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'register', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.login_acc = dict_home['LoginAccount']
        self.new_pass = dict_home['NewPass']
        self.renew_pass = dict_home['RenewPass']
        self.mer_name = dict_home['MerName']
        self.bus_id = dict_home['BusId']
        self.mer_man = dict_home['MerLinkman']
        self.mer_phone = dict_home['MerLinkphone']
Пример #7
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "ter_to_channel"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.terminal = dict_home['Terminal']
        self.channel_btn = dict_home['ChannelBtn']
        self.channel = dict_home['Channel']
        self.card_btn = dict_home['CardBtn']
        self.all_not = dict_home['AllNot']
        self.card_total = dict_home['CardTotal']
        self.create = dict_home['Create']
Пример #8
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "pay_bank"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.bank_code = dict_home['BankCode']
        self.create = dict_home['Create']
        self.res_null = dict_home['ResNull']

    # ----- 页面操作 ----- #
    def input_bank_code(self, val):
        # 输入账户
Пример #9
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

import datetime
from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "risk_monitor"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.pay_id = dict_home['PayId']
        self.counterfeit = dict_home['Counterfeit']
        self.table_menu = dict_home['TableMenu']
        self.table_val = dict_home['TableValue']

    # ----- 页面操作 ----- #
Пример #10
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AutoCheck

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AutoCheck().read_path("xml", "check"))


class Check(basepage.Action):
    """
    对账接口 测试页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_val = xml_obj.get_attr_by_tag('pageName', 'check', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        # "提交地址" 下拉框
        self.addr = dict_val['ComboboxAddr']
        # 帐号ID
        self.account = dict_val['AccountId']
        # 终端ID
        self.terminal = dict_val['TerminalId']
        # SecureCode
Пример #11
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

import time
from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "home"))


class LoginPage(basepage.Action):
    """
    管理后台登录页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'login', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.name = dict_home['LoginName']
        self.passwd = dict_home['LoginPass']
        self.rand_code = dict_home['RandCode']
        self.phone_code = dict_home['PhoneCode']
        self.login_btn = dict_home['LoginBtn']
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "channel_param"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.method_btn = dict_home['MethodBtn']
        self.method_input = dict_home['MethodInput']
        self.method_val = dict_home['MethodVal']
        self.bank_btn = dict_home['BankBtn']
        self.bank_input = dict_home['BankInput']
        self.bank_val = dict_home['BankVal']
        self.name_btn = dict_home['NameBtn']
Пример #13
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import Merchant

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(Merchant().read_path("xml", "protest"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.pay_id = dict_home['PayId']
        self.query_btn = dict_home['QueryBtn']
        self.appeal_btn = dict_home['AppealBtn']
        self.row = dict_home['Row']

    # ----- 页面操作 ----- #
    def input_pay_id(self, val):
Пример #14
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import Merchant

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(Merchant().read_path("xml", "refund_apply"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'apply', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.order_num = dict_home['OrderNum']
        self.pay_id = dict_home['PayId']
        self.refund_part = dict_home['RefundPart']
        self.refund_amount = dict_home['RefundAmount']
        self.refund_reason = dict_home['RefundReason']
        self.refund_des = dict_home['RefundDes']
        self.refund_info = dict_home['RefundInfo']
Пример #15
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "subject_info"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.name_btn = dict_home['NameBtn']
        self.name_input = dict_home['NameInput']
        self.name_val = dict_home['NameVal']
        self.subject = dict_home['Subject']
        self.settle = dict_home['Settle']
        self.create = dict_home['Create']
        self.res_null = dict_home['ResNull']
Пример #16
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "mer_web_white"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.terminal = dict_home['Terminal']
        self.create = dict_home['Create']
        self.review = dict_home['Review']
        self.verify = dict_home['Verify']
        self.res_null = dict_home['ResNull']

    # ----- 页面操作 ----- #
Пример #17
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import Merchant

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(Merchant().read_path("xml", "freeze"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.pay_id = dict_home['PayId']
        self.query_btn = dict_home['QueryBtn']
        self.refund_btn = dict_home['RefundBtn']
        self.row = dict_home['Row']
        self.confirm = dict_home['Confirm']

    # ----- 页面操作 ----- #
Пример #18
0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Date    : 2018-04-15 09:00:00
# @Author  : Canon
# @Link    : https://www.python.org
# @Version : 3.6.1

from common import basepage
from common import xml_utils
from common.conf_utils import AdminSystem

# 读取 xml 文件
xml_obj = xml_utils.XmlUtils(AdminSystem().read_path("xml", "agent_mer"))


class Query(basepage.Action):
    """
    查询页面
    """
    def __init__(self, selenium_driver):
        super().__init__(selenium_driver)
        dict_home = xml_obj.get_attr_by_tag('pageName', 'query', 'locator')

        # ----- 定位器,通过元素属性定位元素对象 ----- #
        self.mer_no = dict_home['MerNo']
        self.create = dict_home['Create']
        self.res_null = dict_home['ResNull']

    # ----- 页面操作 ----- #
    def input_mer_no(self, val):
        # 输入账户