Example #1
0
def back_from_info_page(driver):
    back_btn = driver.find_element_by_css_selector(
        "button.el-button.el-button--default")
    back_btn.click()
    common.wait_until_loading_disappeared(driver)
    driver.refresh()
    common.wait_until_loading_disappeared(driver)
Example #2
0
def search_training_by_title(driver, title):
    element_title = driver.find_elements_by_css_selector(
        "label[for='name']+div>div>input")[0]
    element_title.send_keys(title)
    search_btn = driver.find_elements_by_css_selector(
        "button.el-button.el-button--primary")[0]
    search_btn.click()
    common.wait_until_loading_disappeared(driver)
Example #3
0
def delete_notification_by_title(driver, title):
    delete_btn = driver.find_element_by_xpath(
        "//span[contains(text(), '" + title +
        "')]/../../../../td[3]/div/button")
    delete_btn.click()
    yes_btn = driver.find_element_by_css_selector(
        "span.bounced_button.bounced_sure")
    yes_btn.click()
    common.wait_until_loading_disappeared(driver)
    time.sleep(0.5)
Example #4
0
def search_and_wait(driver):
    search_btn = driver.find_elements_by_css_selector(
        "button.el-button.el-button--primary")[0]
    search_btn.click()
    common.wait_until_loading_disappeared(driver)
    time.sleep(0.5)
Example #5
0
def create_qudao(driver, dictory1, dictory2, dictory3, dictory4):
    # 第一步
    qd_name = driver.find_element_by_css_selector(
        "label[for='name']+div>div>input")
    qd_name.send_keys(dictory1["name"])
    qd_short_name = driver.find_element_by_css_selector(
        "label[for='short_name']+div>div>input")
    qd_short_name.send_keys(dictory1["short_name"])
    qd_legal_name = driver.find_element_by_css_selector(
        "label[for='legal_name']+div>div>input")
    qd_legal_name.send_keys(dictory1["legal_name"])
    qd_legal_idnumber = driver.find_element_by_css_selector(
        "label[for='legal_idnumber']+div>div>input")
    qd_legal_idnumber.send_keys(dictory1["legal_idnumber"])
    qd_mobile = driver.find_element_by_css_selector(
        "label[for='mobile']+div>div>input")
    qd_mobile.send_keys(dictory1["mobile"])
    qd_email = driver.find_element_by_css_selector(
        "label[for='email']+div>div>input")
    qd_email.send_keys(dictory1["email"])

    auth_province_btn = driver.find_element_by_css_selector(
        "input[placeholder='请选择授权省份']")
    auth_province_btn.click()
    time.sleep(1)
    if dictory1["province"] == u"北京市":
        province_bj = driver.find_elements_by_css_selector(
            "li[areaid='11']")[1]
        province_bj.click()
    auth_city_btn = driver.find_element_by_css_selector(
        "input[placeholder='请选择授权城市']")
    auth_city_btn.click()
    time.sleep(1)
    if dictory1["city"] == u"北京市":
        city_bj = driver.find_elements_by_css_selector("li[cityid='181']")[1]
        city_bj.click()
    next_btn1 = driver.find_elements_by_css_selector(
        "button.el-button.el-button--primary")[1]
    next_btn1.click()
    time.sleep(1)

    # 第二步
    qd_slsm_mobile = driver.find_element_by_css_selector(
        "label[for='slsm_mobile']+div>div>input")
    qd_slsm_mobile.send_keys(dictory2["slsm_mobile"])
    qd_business_name = driver.find_element_by_css_selector(
        "label[for='business_name']+div>div>input")
    qd_business_name.send_keys(dictory2["business_name"])
    qd_business_mobile = driver.find_element_by_css_selector(
        "label[for='business_mobile']+div>div>input")
    qd_business_mobile.send_keys(dictory2["business_mobile"])
    qd_business_email = driver.find_element_by_css_selector(
        "label[for='business_email']+div>div>input")
    qd_business_email.send_keys(dictory2["business_email"])
    qd_finace_name = driver.find_element_by_css_selector(
        "label[for='finace_name']+div>div>input")
    qd_finace_name.send_keys(dictory2["finace_name"])
    qd_finace_mobile = driver.find_element_by_css_selector(
        "label[for='finace_mobile']+div>div>input")
    qd_finace_mobile.send_keys(dictory2["finace_mobile"])
    qd_finace_email = driver.find_element_by_css_selector(
        "label[for='finace_email']+div>div>input")
    qd_finace_email.send_keys(dictory2["finace_email"])
    qd_manager_name = driver.find_element_by_css_selector(
        "label[for='manager_name']+div>div>input")
    qd_manager_name.send_keys(dictory2["manager_name"])
    qd_manager_mobile = driver.find_element_by_css_selector(
        "label[for='manager_mobile']+div>div>input")
    qd_manager_mobile.send_keys(dictory2["manager_mobile"])
    qd_service_manager_name = driver.find_element_by_css_selector(
        "label[for='service_manager_name']+div>div>input")
    qd_service_manager_name.send_keys(dictory2["service_manager_name"])
    qd_service_manager_mobile = driver.find_element_by_css_selector(
        "label[for='service_manager_mobile']+div>div>input")
    qd_service_manager_mobile.send_keys(dictory2["service_manager_mobile"])
    qd_logo = driver.find_element_by_css_selector("input[name='logo_url']")
    qd_logo.send_keys(dictory2["logo_url"])
    common.wait_until_loading_disappeared(driver)
    qd_icon = driver.find_element_by_css_selector("input[name='icon_url']")
    qd_icon.send_keys(dictory2["icon_url"])
    common.wait_until_loading_disappeared(driver)
    qd_business_license = driver.find_element_by_css_selector(
        "input[name='business_license_url']")
    qd_business_license.send_keys(dictory2["business_license_url"])
    common.wait_until_loading_disappeared(driver)
    qd_bank_account = driver.find_element_by_css_selector(
        "input[name='bank_account_url']")
    qd_bank_account.send_keys(dictory2["bank_account_url"])
    common.wait_until_loading_disappeared(driver)
    qd_address = driver.find_element_by_css_selector(
        "label[for='address']+div>div>input")
    qd_address.send_keys(dictory2["address"])
    next_btn2 = driver.find_elements_by_css_selector(
        "button.el-button.el-button--primary")[2]
    next_btn2.click()
    time.sleep(1)

    # 第三步
    qd_bankuser = driver.find_element_by_css_selector(
        "label[for='bankuser']+div>div>input")
    qd_bankuser.send_keys(dictory3["bankuser"])
    qd_bankaccount = driver.find_element_by_css_selector(
        "label[for='bankaccount']+div>div>input")
    qd_bankaccount.send_keys(dictory3["bankaccount"])
    qd_wechat_fee = driver.find_element_by_css_selector(
        "label[for='wechat_fee']+div>div>input")
    qd_wechat_fee.send_keys(dictory3["wechat_fee"])
    qd_alipay_fee = driver.find_element_by_css_selector(
        "label[for='alipay_fee']+div>div>input")
    qd_alipay_fee.send_keys(dictory3["alipay_fee"])
    qd_qqwallet_fee = driver.find_element_by_css_selector(
        "label[for='qqwallet_fee']+div>div>input")
    qd_qqwallet_fee.send_keys(dictory3["qqwallet_fee"])
    qd_jd_fee = driver.find_element_by_css_selector(
        "label[for='jd_fee']+div>div>input")
    qd_jd_fee.send_keys(dictory3["jd_fee"])
    qd_swipecard_fee = driver.find_element_by_css_selector(
        "label[for='swipecard_fee']+div>div>input")
    qd_swipecard_fee.send_keys(dictory3["swipecard_fee"])
    qd_default_mchnt_fee = driver.find_element_by_css_selector(
        "label[for='default_mchnt_fee']+div>div>input")
    qd_default_mchnt_fee.send_keys(dictory3["default_mchnt_fee"])
    next_btn3 = driver.find_elements_by_css_selector(
        "button.el-button.el-button--primary")[3]
    next_btn3.click()
    time.sleep(1)
    # 第四步
    save_btn = driver.find_elements_by_css_selector(
        "button.el-button.el-button--primary")[4]
    save_btn.click()
    common.wait_until_loading_disappeared(driver)
    time.sleep(1)
Example #6
0
def check_add_values_info(driver):
    qudao_id = get_qudao_id(driver, 1)
    add_values_info_btn = driver.find_element_by_css_selector(
        "a[href='#/channel_pro/" + qudao_id + "']")
    add_values_info_btn.click()
    common.wait_until_loading_disappeared(driver)