Ejemplo n.º 1
0
class ReturnPage(Page):
    return_button = NewPageElement(css="ul.el-menu > li:nth-child(5) > a")
    return_manage = NewPageElement(css="ul.flex > li:nth-child(1) > a")
    return_record = NewPageElement(css="ul.flex > li:nth-child(2) > a")
    return_manage_approved = NewPageElement(css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(1) > a")
    return_manage_record = NewPageElement(css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(2) > a")
    pass
Ejemplo n.º 2
0
class BaiduPage(Page):
    search_input = NewPageElement(id_="kw", describe="搜索框")
    search_button = NewPageElement(id_="su", describe="搜索按钮")
    settings = NewPageElement(xpath='//*[@id="s-usersetting-top"]',
                              describe="设置下拉框")
    search_setting = NewPageElement(link_text='搜索设置', describe="搜索设置选项")
    save_setting = NewPageElement(css=".prefpanelgo", describe="保存设置")
class DgtPaymentPage(Page):
    """DgtPayment page"""
    dgtPayment = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[last()-1]"
    )  # 數位產品收款
    product_name = NewPageElement(name="productname")
Ejemplo n.º 4
0
class AgentPage(Page):
    agent_button = NewPageElement(css="ul.el-menu > li:nth-child(4) > a")
    agent_company = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(1)")
    agent_record = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(2)")
    pass
Ejemplo n.º 5
0
class AccountPage(Page):
    """account page"""
    account_withdraw = NewPageElement(xpath="//ul[@id='sidebarnav']/li/a",
                                      describe="帳戶提領")
    withdraw = NewPageElement(link_text="提領", describe="提領")
    withdraw_cancel = NewPageElement(link_text="取消提領", describe="取消提領")
    dialog1 = NewPageElement(id_="box1")
    dialog2 = NewPageElement(id_="box2")
Ejemplo n.º 6
0
class LoginPage(Page):

    server_button=NewPageElement(css=".anticon-setting > svg")
    server_selector=NewPageElement(xpath="//span[contains(.,'请选择服务器地址')]")
    testServer_option=NewPageElement(xpath="//div[4]/div")

    mobileLogin_button=NewPageElement(id_="rc-tabs-0-tab-mobile")
    mobile_input=PageElements(id_="data0",timeout=2)
    verificationCode_input=PageElements(id_="data0",timeout=2)
    login_button=NewPageElement(xpath="//button[@type='submit']")
Ejemplo n.º 7
0
class LoginPage(Page):
    username_input = NewPageElement(
        xpath="/html/body/div[1]/div/div[1]/form/div[1]/div/div[1]/input",
        describe="用户名")
    password_input = NewPageElement(
        xpath="/html/body/div[1]/div/div[1]/form/div[2]/div/div[1]/input",
        describe="密码")
    login_button = NewPageElement(xpath="/html/body/div[1]/div/div[1]/button",
                                  describe="登录按钮")
    welcome_text = NewPageElement(
        xpath="/html/body/div[1]/section/section/header/div/div[3]/span/p",
        describe="欢迎文案",
        timeout=5)
Ejemplo n.º 8
0
class login(Page):
    """ 项目用户登录、退出定位元素"""
    url = Url.baseUrl
    # 示例
    search_input_loc = NewPageElement(id_='kw')
    search_button_loc = NewPageElement(id_='su')

    def search_input(self, key):
        self.search_input_loc.clear()
        self.search_input_loc.send_keys(key)

    def search_button(self):
        self.search_button_loc.click()
Ejemplo n.º 9
0
class BillingPage(Page):
    """billing page"""

    show_message = NewPageElement(id_="show_message")
    copylink = NewPageElement(id_="copylink")
    logo = NewPageElement(xpath="//div[@class='logo']")
    ccno1 = NewPageElement(name="cc1")
    ccno2 = NewPageElement(name="cc2")
    ccno3 = NewPageElement(name="cc3")
    ccno4 = NewPageElement(name="cc4")
    bill_query = NewPageElement(xpath="//ul[@id='sidebarnav']/li[3]/a/i",
                                describe="帳單查詢")
    dialog = NewPageElement(xpath="//div[@role='dialog']")
    query_form = NewPageElement(xpath="//form[@name='listform']")
Ejemplo n.º 10
0
class LoginPage(Page):
    a = "1111111111"
    company_name = NewPageElement(css=
                                  "div#app > div:nth-child(1) > div:nth-child(1) > div:nth-child(3) > p:nth-child(1)")
    body = NewPageElement(css="body")
    user_input = NewPageElement(css="form > div:nth-child(1) > div > div > input")
    password_input = NewPageElement(css="form > div:nth-child(2) > div > div > input")
    login_button = NewPageElement(css="form > button")
    forget_password_button = NewPageElement(css="form > div:nth-child(4) > span:nth-child(1)")
    register_button = NewPageElement(css="form > div:nth-child(4) > span:nth-child(1)")
    select_hospital = NewPageElement(
        css="div.el-scrollbar__view > ul > li:nth-child(1) > div > div:nth-child(2) > div:nth-child(2) > button")
    select_ensure = NewPageElement(css="div.el-dialog__body > div > div:nth-child(3) > button")
    pass
Ejemplo n.º 11
0
class PaymentPage(Page):
    """payment page"""
    userid_input = NewPageElement(id_="USERID", describe="帳號")
    pwd_input = NewPageElement(name="PWD", describe="密碼")
    validate_input = NewPageElement(name="validatecode")
    login_button = NewPageElement(class_name="btn")
    button = NewPageElement(xpath="(//button[@type='button'])[6]",
                            describe="第六個進入按鈕")
    services = NewPageElement(class_name="dropdown-toggle")
    payment_service = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[4]"
    )  # 線上收款
    trans_manage = NewPageElement(xpath="//ul[@id='sidebarnav']/li[1]/a/i",
                                  describe="交易管理")
    trans_query = NewPageElement(xpath="//ul[@id='sidebarnav']/li[1]/ul/li/a",
                                 describe="訂單查詢")
    query_form = NewPageElement(xpath="//form[@name='form_orders_list']")
Ejemplo n.º 12
0
class HomePage(Page):
    course_button = NewPageElement(
        xpath='//*[@id="app"]/section/section/main/div/div[3]/div/div[1]',
        describe="课程")
    examine_button = NewPageElement(
        xpath=
        '/html/body/div/section/section/main/div/div/div/div/div[2]/div[2]/button[2]',
        describe="开始考核")
    check_button = NewPageElement(
        xpath=
        '/html/body/div/section/section/main/div/div[1]/div[1]/div[2]/div/ul/li/div[2]/div/label[1]',
        describe="选择答案")
    submit_button = NewPageElement(
        xpath='/html/body/div/section/section/main/div/div[1]/div[2]/button[1]',
        describe="提交答案")
    pass_text = NewPageElement(
        xpath=
        "/html/body/div[1]/section/section/main/div/div[2]/div/div/div[2]/div[1]/ul/li/span[2]/span[1]",
        describe="通知答案")
Ejemplo n.º 13
0
class ECPage(Page):
    """Ec page"""

    show_message = NewPageElement(id_="show_message")
    refund_manage = NewPageElement(xpath="//ul[@id='sidebarnav']/li[2]/a/i",
                                   describe="退款管理")
    refund = NewPageElement(xpath="//ul[@id='sidebarnav']/li[2]/ul/li/a",
                            describe="退款")
    refund_reversal = NewPageElement(
        xpath="//ul[@id='sidebarnav']/li[2]/ul/li[2]/a", describe="退款取消")
    # query_form = NewPageElement(xpath="//form[@name='listform']")
    trnas_manage = NewPageElement(xpath="//ul[@id='sidebarnav']/li/a/i")
    cancel_order = NewPageElement(link_text="取消訂單")
    cancelrefund = NewPageElement(id_="confirm_cancelrefund")
    query_button = NewPageElement(id_="query_btn", describe="查詢按鈕")
    query_body = NewPageElement(
        xpath=
        "//div[@id='main-wrapper']/div/div/div[3]/div/div/div/form/div[2]/div/div/table/tbody/tr/td",
        describe="查詢結果表身第一筆")
    dialog = NewPageElement(xpath="//div[@role='dialog']",
                            describe="確認對話dialog")
Ejemplo n.º 14
0
class OrderPage(Page):
    order_button = NewPageElement(css="ul.el-menu > li:nth-child(2) > a")
    unfinished_button = NewPageElement(css="ul.flex > li:nth-child(1) > a")
    finished_button = NewPageElement(css="ul.flex > li:nth-child(2) > a")
    paid_button = NewPageElement(css="ul.flex > li:nth-child(3) > a")
    # all_order_button = NewPageElement(css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(1) > a")
    untreated_order_button = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(1) > a")
    prepare_order_button = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(2) > a")
    distribution_order_button = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(3) > a")
    unfinished_order_button = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(4) > a")
    pass
Ejemplo n.º 15
0
class SettingPage(Page):
    setting_button = NewPageElement(css="ul.el-menu > li:nth-child(7) > a")
    set_basic = NewPageElement(css="ul.flex > li:nth-child(1) > a")
    set_vip = NewPageElement(css="ul.flex > li:nth-child(2) > a")
    consumption_records = NewPageElement(css="ul.flex > li:nth-child(3) > a")
    set_basic_company = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(1) > a")
    set_basic_account = NewPageElement(
        css="div.verticalRouterView-nav-list > nav > ul > li:nth-child(2) > a")
    pass
Ejemplo n.º 16
0
class EntPage(Page):
    # 企业认证按钮
    button1 = NewPageElement(
        xpath=
        '//*[@id="root"]/div[1]/section/section/main/div/div/div/div[1]/div/div[2]/button'
    )

    entName_input = NewPageElement(id_='entName')
    uniscid_input = NewPageElement(id_='uniscid')
    # 选择主要经营模式
    busiModel_input = NewPageElement(id_='busiModel')
    # 选择独立经营
    busiModel_option = NewPageElement(
        xpath='/html/body/div[10]/div/div/div/div[2]/div[1]/div/div/div[1]/div'
    )

    industry_input = NewPageElement(id_='industry')
    principal_input = NewPageElement(id_='mobile')
    address_input = NewPageElement(id_='address')
    address_input = NewPageElement(
        xpath='/html/body/div[7]/div/div/div/ul[2]/li')
Ejemplo n.º 17
0
class BaiduIndexPage(Page):
    search_input = NewPageElement(name='wd')
    search_button = NewPageElement(id_='su')
Ejemplo n.º 18
0
class RecBillingPage(Page):
    """RecBilling page"""

    product_name = NewPageElement(name="productname")
    alert_success = NewPageElement(xpath="//div[@id='success']/h3")
    # menubar
    recbill = NewPageElement(xpath="//ul[@id='sidebarnav']/li[2]/a/i", describe="繳費單管理")
    recbill_batch_create = NewPageElement(xpath="//ul[@id='sidebarnav']/li[2]/ul/li[2]/a", describe="繳費單管理_批次建立")
    recbill_import = NewPageElement(xpath="//ul[@id='sidebarnav']/li[2]/ul/li[3]/a", describe="繳費單管理_匯入建立")
    recbill_query = NewPageElement(xpath="//ul[@id='sidebarnav']/li[2]/ul/li[4]/a", describe="繳費單管理_繳費單查詢")
    recbill_info = NewPageElement(xpath="//ul[@id='sidebarnav']/li[1]/a/i", describe="繳費項目管理")
    recbill_info_create = NewPageElement(xpath="//ul[@id='sidebarnav']/li[1]/ul/li/a", describe="繳費項目管理_建立")
    recbill_info_import = NewPageElement(xpath="//ul[@id='sidebarnav']/li[1]/ul/li[2]/a", describe="繳費項目管理_建立")
    recbill_info_query = NewPageElement(xpath="//ul[@id='sidebarnav']/li[1]/ul/li[3]/a", describe="繳費項目管理_查詢")
    recurrence_create = NewPageElement(xpath="//ul[@id='sidebarnav']/li[3]/ul/li/a", describe="預約建立")
    reservation = NewPageElement(xpath="//ul[@id='sidebarnav']/li[3]/a/i", describe="預約管理")

    query_form = NewPageElement(id_="queryform2", describe="查詢列表")

    query_result = NewPageElement(id_="results", describe="查詢結果")

    querydetail_btn = NewPageElement(id_="querydetail_btn", describe="檢視按鈕")
    show_message = NewPageElement(id_="show_recbillname", describe="確認發送")
    recbillname = NewPageElement(name="recbillname", describe="繳費單名稱")
    recbillinfo_name = NewPageElement(id_="recbillinfo_name", describe="繳費單名稱")
    surecreate_btn = NewPageElement(id_="surecreate_btn", describe="確認要發送鍵")
    boxSee = NewPageElement(id_="boxSee", describe="付款資訊明細")
    refund_submit = NewPageElement(id_="refund_submit_btn", describe="確認退款送出")
    refund_sure = NewPageElement(id_="refund_sure_btn", describe="確認退款鍵")
    cancelrefund = NewPageElement(id_="btn_cancelrefund", describe="確認取消退款送出")

    view_deletemessage = NewPageElement(id_="view_deletemessage", describe="確定刪除鍵")
Ejemplo n.º 19
0
class IndexPage(Page):
    body = NewPageElement(css="body")
    index_button = NewPageElement(css="ul.el-menu > li:nth-child(1) > a")
    user_name = NewPageElement(css="div.supName > span")
    hospital_name = NewPageElement(css="div.nuhName")
    change_hospital_button = NewPageElement(css="div.nuhName > span")
    close_hospital = NewPageElement(
        xpath=r"/html/body/div[2]/div/div[1]/button")
    zi_zhi_ti_xing_button = NewPageElement(
        css="div.head-right > a:nth-child(1)")
    jin_xiao_ti_xing_button = NewPageElement(
        css="div.head-right > a:nth-child(2)")
    ku_cun_yu_jing_button = NewPageElement(
        css="div.head-right > a:nth-child(3)")
    wei_chu_li_button = NewPageElement(css="div.head-right > a:nth-child(4)")
    wei_wan_jie_button = NewPageElement(css="div.head-right > a:nth-child(5)")
    tui_huo_dan_button = NewPageElement(css="div.head-right > a:nth-child(6)")
    order_button = NewPageElement(
        css=
        "div.main-content > div:nth-child(1) > div:nth-child(3) > div > div > "
        "div.card-header > span.card-header-title > button")
    order_quarter_button = NewPageElement(
        css=
        "div.main-content > div:nth-child(1) > div:nth-child(3) > div > div > "
        "div.card-header > div.card-header-type > span:nth-child(1)")
    order_month_button = NewPageElement(
        css=
        "div.main-content > div:nth-child(1) > div:nth-child(3) > div > div > "
        "div.card-header > div.card-header-type > span:nth-child(2)")
    order_report_button = NewPageElement(
        css=
        "div.main-content > div:nth-child(1) > div:nth-child(3) > div > div > "
        "div.card-table > div:nth-child(2) > svg")
    return_button = NewPageElement(
        css="div.main-content > div:nth-child(1) > div:nth-child(4) > div > "
        "div.card-header > span.card-header-title > button")
    return_quarter_button = NewPageElement(
        css="div.main-content > div:nth-child(1) > div:nth-child(4) > div > "
        "div.card-header > div.card-header-type > span:nth-child(1)")
    return_month_button = NewPageElement(
        css="div.main-content > div:nth-child(1) > div:nth-child(4) > div > "
        "div.card-header > div.card-header-type > span:nth-child(2)")
    return_report_button = NewPageElement(
        css="div.main-content > div:nth-child(1) > div:nth-child(4) > div > "
        "div:nth-child(2) > div.card-table > div:nth-child(2) > svg")
    market_button = NewPageElement(
        css=
        "div.ranking-row > div.card-header > span.card-header-title > button")
    market_year_button = NewPageElement(
        css="div.ranking-row > div.card-header > div.card-header-type > "
        "span:nth-child(1)")
    market_month_button = NewPageElement(
        css="div.ranking-row > div.card-header > div.card-header-type > "
        "span:nth-child(2)")
    market_quarter_button = NewPageElement(
        css="div.ranking-row > div.card-header > div.card-header-type > "
        "span:nth-child(3)")
    all_order_button = NewPageElement(
        css="div.order > div.card-header > div.card-header-type > "
        "span:nth-child(1)")
    wcl_order_button = NewPageElement(
        css="div.order > div.card-header > div.card-header-type > "
        "span:nth-child(2)")
    wwj_order_button = NewPageElement(
        css="div.order > div.card-header > div.card-header-type > "
        "span:nth-child(3)")
    ywc_order_button = NewPageElement(
        css="div.order > div.card-header > div.card-header-type > "
        "span:nth-child(4)")
    order_untreated = NewPageElement(css="div.order > div:nth-child(3) > svg")
    pass
Ejemplo n.º 20
0
class BaiduPage(Page):
    search_input = NewPageElement(id_="kw", describe="搜索框")
    search_button = NewPageElement(id_="su", describe="搜索按钮")
    settings = NewPageElement(link_text="设置", describe="设置下拉框")
    search_setting = NewPageElement(css=".setpref", describe="搜索设置选项")
    save_setting = NewPageElement(css=".prefpanelgo", describe="保存设置")
Ejemplo n.º 21
0
class RunoobPage(Page):
    iframe = NewPageElement(css="#iframeResult")
    div = CSSElement("html > body > div")
Ejemplo n.º 22
0
class BaiduIndexPage(Page):
    search_input = NewPageElement(name='wd', describe="搜索框")
Ejemplo n.º 23
0
class FirstPage(Page):
    #企业入驻认证按钮
    addEnterprise_button = NewPageElement(xpath='//*[@id="root"]/div[1]/section/aside/div/div[1]/ul/li[2]/a')
Ejemplo n.º 24
0
class BaiduPage(Page):
    """ 百度Page,封装页面操作到的元素 """
    search_input = NewPageElement(css='#kw', timeout=10, describe='搜索栏')
    search_enter = NewPageElement(css='#su', timeout=10, describe='搜索按钮')
Ejemplo n.º 25
0
class XiaoyusanPage(Page):
    """
    商详页面封装操作到的元素
    """
    click_bug_sx = NewPageElement(xpath="//*[contains(text(),'立即投保')]",
                                  describe="立即投保")
    """
    试算页面封装操作到的元素
    """
    plan_id = NewPageElement(xpath="//*[text()= '" +
                             info_deal.plan_info["coverage"] + "']",
                             describe="标准版")
    plan_Guarantee_time = NewPageElement(
        xpath="//*[text()= '" + info_deal.plan_info["Guarantee_time"] + "']",
        describe="保障年限")
    plan_Pay_period = NewPageElement(xpath="//*[text()= '" +
                                     info_deal.plan_info["Pay_period"] + "']",
                                     describe="交费年限")
    plan_ext_risk_bbrhm = NewPageElement(xpath="//*[text()= '投保']",
                                         describe="投保")
    """
    登录页面封装操作到的元素
    """
    phone_input_dx = NewPageElement(
        xpath="//*[@placeholder='请输入手机号' and @class='form-sign-input']",
        describe="请输入手机号")
    phone_input_cx = NewPageElement(xpath="// *[ @ id = 'input_phone']",
                                    describe="请输入手机号")

    security_input_dx = NewPageElement(
        xpath="//*[@placeholder='请输入验证码' and @class='form-sign-input']",
        describe="请输入验证码")
    security_input_cx = NewPageElement(xpath="//*[@id='input_code']",
                                       describe="请输入验证码")
    login_click_cx = NewPageElement(xpath="// *[ @ id = 'query']",
                                    describe="确定")
    login_click_dx = NewPageElement(
        xpath=
        "//*[contains(text(),'确定') and @style='background-color: rgb(140, 127, 238);'  ]",
        describe="确定")
    """
          键告页面封装操作到的元素
    """
    healthy_yes = NewPageElement(xpath="//*[contains(text(),'确认无以上问题')]",
                                 describe="确认无以上问题")
    """
      下单页面封装操作到的元素
    """

    click_bug = NewPageElement(
        xpath="//*[@id='app']/form/div[2]/section/div/a", describe="立即支付")
    hq_tbr_name = NewPageElement(
        xpath=
        "//*[@id='app']/form/div[1]/div[1]/article/div/div/div[1]/div[1]/div/input",
        describe="获取投保人姓名")
    select_tbr_validity_type = NewPageElement(
        xpath="//*[text()= '" + info_deal.tbr_info["idValidType"] + "']",
        describe="证件有效期类型")

    select_tbr = NewPageElement(
        xpath="//*[@id='app']/form/div[1]/div[1]/article/div[1]/div[1]/div/div",
        describe="进入选择投保人")
    select_tbr_first = NewPageElement(
        xpath=
        "/html/body/div[5]/div[1]/div/div[2]/div/div/div[2]/div[1]/div/div/div[1]/div/div[1]/i",
        describe="选择第一个投保人")
    select_bbr = NewPageElement(
        xpath=
        "//*[@id='app']/form/div[1]/div[2]/div/article/div[2]/div/div[1]/div[1]/div/div",
        describe="进入选择投保人")
    select_bbr_first = NewPageElement(
        xpath=
        "/html/body/div[5]/div[1]/div/div[2]/div/div/div[2]/div[1]/div/div/div[1]/div/div[1]/i",
        describe="选择第一个投保人")
    tbr_name_input = NewPageElement(xpath="//*[@placeholder='请填写投保人姓名']",
                                    describe="填写投保人姓名")
    tbr_id_input = NewPageElement(xpath="//*[@placeholder='请输入投保人证件号码']",
                                  describe="填写投保人证件号")
    tbr_phone_num_input = NewPageElement(xpath="//*[@placeholder='请填写投保人手机号']",
                                         describe="请填写投保人手机号")
    tbr_email_input = NewPageElement(xpath="//*[@placeholder='请填写投保人邮箱']",
                                     describe="请填写投保人邮箱")
    bbr_name_input = NewPageElement(xpath="//*[@placeholder='请填写被保人姓名']",
                                    describe="填写被保人姓名")
    bbr_id_input = NewPageElement(xpath="//*[@placeholder='请输入被保人证件号']",
                                  describe="填写被保人证件号")
    hq_tips = NewPageElement(class_name="gold-dialog-text", describe="弹窗")
    hq_abnormal = NewPageElement(class_name="element-error", describe="提示语")
    residentDetail = NewPageElement(xpath="//*[@placeholder='请填写投保人详细地址']",
                                    describe="详细地址")
    bbr_height = NewPageElement(xpath="//*[@placeholder='请输入被保人身高']",
                                describe="被保人身高")
    bbr_weight = NewPageElement(xpath="//*[@placeholder='请输入被保人体重']",
                                describe="被保人体重")
    bankNo = NewPageElement(xpath="//*[@placeholder='请填写投保人银行卡号']",
                            describe="请填写投保人银行卡号")
    """
          订单确认页面封装操作到的元素
    """
    click_fxk = NewPageElement(class_name="act-gold-protocol-icon")
    click_bug_zf = NewPageElement(xpath="//*[contains(text(),'立即购买')]",
                                  describe="立即购买")
    """
           模拟支付页面封装操作到的元素
    """
    hq_zfxx = NewPageElement(xpath="/html/body", describe="获取模拟支付信息")
    """
          合规弹框封装操作到的元素
    """
    accept_button = NewPageElement(
        xpath="//*[@class= 'gold-dialog-item gold-dialog-confirm']",
        describe="同意并继续")
Ejemplo n.º 26
0
class BingPagePoium(Page):
    """poium 版本"""
    input = NewPageElement(id_='sb_form_q', timeout=2, describe='搜索框')
    button = NewPageElement(id_='sb_form_go', timeout=2, describe='搜索按钮')
Ejemplo n.º 27
0
class BaiduIndexPage(Page):
    search_input = NewPageElement(name='wd')
    search_button = NewPageElement(id_='su')
    settings_button = NewPageElement(id_='s-usersetting-top')
    settings_search_button = NewPageElement(link_text='搜索设置')
Ejemplo n.º 28
0
class DonationPage(Page):
    """donation page"""
    userid_input = NewPageElement(id_="USERID", describe="帳號")
    pwd_input = NewPageElement(name="PWD", describe="密碼")
    validate_input = NewPageElement(name="validatecode")
    login_button = NewPageElement(class_name="btn")
    button = NewPageElement(xpath="(//button[@type='button'])[6]",
                            describe="第六個進入按鈕")
    services = NewPageElement(class_name="dropdown-toggle")
    donation = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[last()]"
    )  # 捐款平台
    donation_project = NewPageElement(xpath="//ul[@id='sidebarnav']/li[1]/a/i")
    project_create = NewPageElement(
        xpath="//ul[@id='sidebarnav']/li[1]/ul/li/a")
    donation_quick = NewPageElement(xpath="//ul[@id='sidebarnav']/li[2]/a/i")
    donation_query = NewPageElement(xpath="//ul[@id='sidebarnav']/li[5]/a/i",
                                    describe="捐款查詢")
    donation_scan = NewPageElement(xpath="//ul[@id='sidebarnav']/li[4]/a/i",
                                   describe="掃碼捐款")
    donation_scan_money = NewPageElement(link_text=u"固定金額碼", describe="固定金額碼")
    query_form = NewPageElement(xpath="//form[@name='listform']")

    donation_approvednumber = NewPageElement(name="approvednumber")
    usename_input = NewPageElement(id_="usename_input", describe="捐款用途")
    donation_amount = NewPageElement(id_="donation_amount")
    mobile = NewPageElement(name="send_mobile")
    send = NewPageElement(id_="surecreate_btn")
    show_message = NewPageElement(id_="show_message")
    close_button = NewPageElement(id_="close_btn")
    select = NewPageElement(xpath="//select[@id='validday']")

    amount = NewPageElement(name="amount")
    name = NewPageElement(id_="name")
    payphone = NewPageElement(id_="payphone")
    email = NewPageElement(id_="email")
    next_button = NewPageElement(xpath="//button[@class='next']")
    cardnumber = NewPageElement(id_="cardnumber")
    cardexpiry = NewPageElement(id_="cardexpiry")
    validatecode = NewPageElement(id_="verification")
    confirm_pay = NewPageElement(xpath="//button[@class='next']")
    cardcvc = NewPageElement(name="back3")
    trans_result = NewPageElement(xpath="//div[@class='result']/h1")
Ejemplo n.º 29
0
class BaiduPage(Page):
    """百度 Page 层,百度页面封装操作到的元素"""
    search_input = NewPageElement(id_='kw', describe="搜索输入框")
    search_button = NewPageElement(id_='su', describe="搜索按钮")
Ejemplo n.º 30
0
class ServicePage(Page):
    """service page"""

    userid_input = NewPageElement(id_="USERID", describe="帳號")
    pwd_input = NewPageElement(name="PWD", describe="密碼")
    validate_input = NewPageElement(name="validatecode", describe="驗證碼")
    login_button = NewPageElement(class_name="btn", describe="登入鍵")
    big_apple_button = NewPageElement(xpath="(//button[@type='button'])[6]",
                                      describe="大蘋果進入鍵")
    yen_store = NewPageElement(xpath="(//button[@type='button'])[7]",
                               describe="顏顏麵包(電商)進入鍵")
    services = NewPageElement(class_name="dropdown-toggle", describe="選擇服務")
    service = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']",
        describe="服務下拉列表")
    recbilling = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[6]",
        describe="繳費收款")
    billing = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[5]",
        describe="帳單收款")
    donation = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[last()]",
        describe="捐款平台")
    dgtpayment = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[last()-1]",
        describe="數位產品收款")
    account = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[1]",
        describe="我的帳戶")

    ec = NewPageElement(
        xpath=
        "//div[@class='dropdown-menu dropdown-menu-right animated bounceInDown show']/a[6]",
        describe="電商購物")

    show_message = NewPageElement(id_="show_message", describe="送出鈕的回應訊息顯示資訊")