Example #1
0
def _login_user_result_error(driver):
    '''
    获取用户名为空
    :param driver:
    '''
    zen = Base(driver)
    result_username_error = zen.get_text(username_error)
Example #2
0
def _login_pwd_result_error(driver):
    '''
    获取登录密码为空
    :param driver:
    '''
    zen = Base(driver)
    result_password_error = zen.get_text(password_error)
Example #3
0
def _login_submit_result_error(driver):
    '''
    获取登录失败
    :param driver:
    '''
    zen = Base(driver)
    result_login_error = zen.get_text(denglu_tishi_error)
Example #4
0
def _login_One(driver, host, user="******", psw="111111"):
    '''
    登录函数
    '''
    zen = Base(driver)
    driver.get(host + "/user/login")
    zen.window_max()
    # time.sleep(1)
    zen.sendKeys(username, user)
    zen.sendKeys(password_loc, psw)
    zen.click(submit_loc)
    time.sleep(2)
Example #5
0
def _login(driver, host, user="******", psw="111111"):
    '''
    登录函数
    '''
    zen = Base(driver)
    driver.get(host + "/user/login")
    zen.window_max()
    zen.sendKeys(username, user)
    zen.sendKeys(password_loc, psw)
    zen.click(submit_loc)
    time.sleep(0.5)
    #判断登录是否成功,如果成功 就判断首页是否存在Welcome 然后在判断是否存在 睿思智能客服云平台
    result_1 = zen.get_text(welcome_1)
    if result_1 == "Welcome":
        zen.click(tuichu_denglu)
        time.sleep(0.5)
        zen.click(quit_log)
        time.sleep(0.5)
        zen.click(quit_queding)
    else:
        print("获取Welcome失败")
Example #6
0
def _login_wdjqr_7(driver):
    '''对照:测试用例7:进入我的机器人页面-复制版本 '''
    zen = Base(driver)
    zen.click(wdjqr_robot)
    time.sleep(1)
    zen.click(wdjqr_fzbb)
    time.sleep(0.5)
    zen.click(wdjqr_fzbb_qd)
    time.sleep(1)
    zen.F5()
    time.sleep(2)
    result = zen.get_text(wdjqr_text)
    time.sleep(0.5)
    if result == "我的机器人":
        zen.click(login_page.tuichu_denglu)
        time.sleep(0.5)
        zen.click(login_page.quit_log)
        time.sleep(1)
        zen.click(login_page.quit_queding)
    else:
        print("退出失败")
    time.sleep(1)
Example #7
0
def _login_wdjqr_6(driver):
    '''对照:测试用例6:批量外呼-查看详情-录音播放-导出明细'''
    zen = Base(driver)
    zen.click(wdjqr_robot)
    time.sleep(2)
    zen.click(wdjqr_pl_wh)
    time.sleep(1)
    zen.click(wdjqr_pl_wh_xqwj)
    os.system(
        "E:\\SoftwareTesting\\Projectpath\\AICC\\aicc_Cloud\\aicc_BatchUpload\\Plsc.exe"
    )
    time.sleep(2)
    now_time = datetime.datetime.now()
    s_time = ("当前秒是%s" % now_time.second)
    zen.sendKeys(wdjqr_pl_wh_xqwj_rwm, s_time)
    time.sleep(0.5)
    zen.click(wdjqr_pl_wh_xqwj_rwm_fqwh)
    time.sleep(3)
    zen.click(xtjk_page.xitong_jiankong)
    time.sleep(20)
    zen.click(whrw_page.task)
    time.sleep(2)
    zen.F5()
    time.sleep(2)
    zen.click(whrw_page.task_ckxq)
    time.sleep(1)
    zen.click(whrw_page.task_ckxq_ckxq)
    time.sleep(1)
    zen.click(whrw_page.task_ckxq_ckxq_bfly)
    time.sleep(13)
    zen.F5()
    time.sleep(2)
    zen.click(whrw_page.task_ckxq_dcly)
    os.system(
        "E:\\SoftwareTesting\\Projectpath\\AICC\\aicc_Cloud\\aicc_BatchUpload\\Dcly.exe"
    )
    time.sleep(8)
    result = zen.get_text(whrw_page.task_rwxq_title)
    if result == "任务详情":
        zen.click(login_page.tuichu_denglu)
        time.sleep(0.5)
        zen.click(login_page.quit_log)
        time.sleep(0.5)
        zen.click(login_page.quit_queding)
    else:
        print("退出失败")
Example #8
0
def _login_wdjqr_5(driver):
    '''对照:测试用例5:复制机器人ID'''
    zen = Base(driver)
    zen.click(wdjqr_robot)
    time.sleep(2)
    zen.click(wdjqr_ID)
    time.sleep(1)
    zen.F5()
    time.sleep(2)
    result = zen.get_text(wdjqr_text)
    time.sleep(0.5)
    if result == "我的机器人":
        zen.click(login_page.tuichu_denglu)
        time.sleep(0.5)
        zen.click(login_page.quit_log)
        time.sleep(2)
        zen.click(login_page.quit_queding)
    else:
        print("退出失败")
    time.sleep(1)
Example #9
0
def _login_whrw_2(driver):
    '''对照:测试用例2:外呼任务 - 重置成功'''
    zen = Base(driver)
    zen.click(task)
    # time.sleep(0.5)
    zen.click(task_whrw_rwzt)
    # time.sleep(1)
    zen.click(task_whrw_rwzt_xz)
    zen.click(task_cx)
    # time.sleep(1.5)
    zen.click(task_cz)
    # time.sleep(1)
    zen.F5()
    # time.sleep(1)
    result = zen.get_text(task_title)
    if result == "外呼任务":
        zen.click(login_page.tuichu_denglu)
        # time.sleep(0.5)
        zen.click(login_page.quit_log)
        # time.sleep(1)
        zen.click(login_page.quit_queding)
        # time.sleep(1)
    else:
        print("退出失败")
Example #10
0
def _login_wdjqr_3(driver):
    '''对照:测试用例3:进入我的机器人页面-查看短信 并截图'''
    zen = Base(driver)
    zen.click(wdjqr_robot)
    time.sleep(2)
    zen.click(wdjqr_ckdx)
    time.sleep(1)
    zen.back()
    time.sleep(1)
    result = zen.get_text(wdjqr_text)
    time.sleep(0.5)
    if result == "我的机器人":
        zen.click(login_page.tuichu_denglu)
        time.sleep(0.5)
        zen.click(login_page.quit_log)
        time.sleep(0.5)
        zen.click(login_page.quit_queding)
    else:
        print("判断失败")
    time.sleep(1)
Example #11
0
def _login_wdjqr_2(driver):
    '''对照:测试用例2:进入我的机器人页面-查看参数 并截图'''
    zen = Base(driver)
    # driver.get(host + "/user/login")
    zen.click(wdjqr_robot)
    time.sleep(2)
    zen.click(wdjqr_ckcs)
    time.sleep(1)
    zen.F5()
    time.sleep(2)
    result = zen.get_text(wdjqr_text)
    time.sleep(0.5)
    if result == "我的机器人":
        zen.click(login_page.tuichu_denglu)
        time.sleep(0.5)
        zen.click(login_page.quit_log)
        time.sleep(0.5)
        zen.click(login_page.quit_queding)
    else:
        print("判断失败")
    time.sleep(1)
Example #12
0
def _login_jqrsc_2(driver,host,user="******", psw="111111"):
    zen = Base(driver)
    zen.sendKeys(login_page.username, user)
    zen.sendKeys(login_page.password_loc, psw)
    zen.click(login_page.submit_loc)
    time.sleep(1)
    zen.click(jqr_maiker)
    time.sleep(1)
    zen.click(copy_jqr)
    time.sleep(0.5)
    time_now = time.strftime('%Y-%m-%d %H:%M:%S')
    zen.sendKeys(jqrsc_name,time_now)
    zen.sendKeys(jqrsc_jieshao,time_now)
    zen.click(jqrsc_determine)
    time.sleep(1)
    result = zen.get_text(jqrsc_z)
    time.sleep(1)
    if result == "机器人市场":
        zen.click(login_page.tuichu_denglu)
        time.sleep(1)
        zen.click(login_page.quit_log)
        time.sleep(1)
        zen.click(login_page.quit_queding)
    else:
        print("失败")
Example #13
0
def _login_jqrsc_1(driver, host, user="******", psw="111111"):
    zen = Base(driver)
    driver.get(host+"/user/login")
    zen.window_max()
    zen.sendKeys(login_page.username, user)
    zen.sendKeys(login_page.password_loc, psw)
    zen.click(login_page.submit_loc)
    time.sleep(1)
    zen.click(jqr_maiker)
    time.sleep(1)
    result = zen.get_text(jqrsc_z)
    if result == "机器人市场":
        print("判断成功")
        zen.click(login_page.tuichu_denglu)
        time.sleep(1)
        zen.click(login_page.quit_log)
        time.sleep(1)
        zen.click(login_page.quit_queding)
    else:
        print("失败")
Example #14
0
def _login_jqrsc_5(driver,host,user="******", psw="111111"):
    zen = Base(driver)
    zen.sendKeys(login_page.username, user)
    zen.sendKeys(login_page.password_loc, psw)
    zen.click(login_page.submit_loc)
    time.sleep(1)
    zen.click(jqr_maiker)
    time.sleep(1)
    zen.click(phone_number)
    time.sleep(1)
    now_time = datetime.datetime.now()
    c_time = ("%r" %now_time)
    zen.sendKeys(shuru_phone,c_time)
    time.sleep(1)
    zen.sendKeys(jqr_rw,c_time)
    time.sleep(1)
    zen.click(waihu)
    time.sleep(1.5)
    zen.click(waihu_quxiao)
    time.sleep(1)
    zen.click(login_page.tuichu_denglu)
    time.sleep(1)
    zen.click(login_page.quit_log)
    time.sleep(1)
    zen.click(login_page.quit_queding)
    time.sleep(2)
Example #15
0
def _login_jqrsc_4(driver,host,user="******", psw="111111"):
    zen = Base(driver)
    zen.sendKeys(login_page.username, user)
    zen.sendKeys(login_page.password_loc, psw)
    zen.click(login_page.submit_loc)
    time.sleep(1)
    zen.click(jqr_maiker)
    time.sleep(1)
    zen.click(copy_jqr)
    time.sleep(1)
    zen.sendKeys(jqrsc_name,"")
    time.sleep(1)
    now_time = datetime.datetime.now()
    c_time = ("%r" %now_time)
    zen.sendKeys(jqrsc_jieshao,c_time)
    time.sleep(1)
    zen.click(jqrsc_determine)
    time.sleep(1.5)
    zen.click(jqrsc_quxiao)
    time.sleep(1)
    zen.click(login_page.tuichu_denglu)
    time.sleep(1)
    zen.click(login_page.quit_log)
    time.sleep(1)
    zen.click(login_page.quit_queding)
    time.sleep(2)
Example #16
0
def _login_jqrsc_3(driver,host,user="******", psw="111111"):
    zen = Base(driver)
    zen.sendKeys(login_page.username, user)
    zen.sendKeys(login_page.password_loc, psw)
    zen.click(login_page.submit_loc)
    time.sleep(1)
    zen.click(jqr_maiker)
    time.sleep(1)
    zen.click(phone_number)
    time.sleep(1)
    zen.sendKeys(shuru_phone,"18811730879")
    time.sleep(1)
    now_time = datetime.datetime.now()
    c_time = ('当前时间是%r' % now_time.second)
    zen.sendKeys(jqr_rw,c_time)
    time.sleep(1)
    zen.click(waihu)
    time.sleep(2)
    zen.click(xtjk_page.xitong_jiankong)
    time.sleep(15)
    zen.click(login_page.tuichu_denglu)
    time.sleep(1)
    zen.click(login_page.quit_log)
    time.sleep(1)
    zen.click(login_page.quit_queding)
    time.sleep(2)
Example #17
0
def _login_wdjqr_4(driver):
    '''对照:测试用例4:在我的机器人页面-正常外呼'''
    zen = Base(driver)
    zen.click(wdjqr_robot)
    time.sleep(2)
    zen.click(wdjqr_zcwh)
    time.sleep(1)
    zen.sendKeys(wdjqr_phone, "18811730879")
    time.sleep(2)
    now_time = datetime.datetime.now()
    a = ("当前是%r" % now_time.second)
    zen.sendKeys(wdjqr_rw_name, a)
    time.sleep(1)
    zen.click(wdjqr_fqwh)
    time.sleep(2)
    zen.click(xtjk_page.xitong_jiankong)
    time.sleep(15)
    result = zen.get_text(xtjk_page.xitong_jiankong_title)
    if result == "系统监控":
        zen.click(login_page.tuichu_denglu)
        time.sleep(0.5)
        zen.click(login_page.quit_log)
        time.sleep(0.5)
        zen.click(login_page.quit_queding)
    else:
        print("退出失败")
Example #18
0
def _login_whrw_1(driver):
    '''对照:测试用例1:批量选中-选中导出'''
    zen = Base(driver)
    zen.click(task)
    # time.sleep(0.5)
    zen.click(task_pldc_mx)
    # time.sleep(1)
    zen.click(task_pldc_mx_xzdc)
    os.system("E:\\SoftwareTesting\\Projectpath\\AICC\\aicc_Cloud\\aicc_BatchUpload\\xzdc.exe")
    # time.sleep(3)
    result = zen.get_text(task_title)
    if result == "外呼任务":
        zen.click(login_page.tuichu_denglu)
        # time.sleep(0.5)
        zen.click(login_page.quit_log)
        # time.sleep(1)
        zen.click(login_page.quit_queding)
    else:
        print("退出失败")
    time.sleep(1)