*** Settings *** Test Teardown Run Keyword If Test Failed Fatal Error Library RequestsLibrary Library Collections Library urllib3 *** Test Cases *** operate_mail Disable Warnings Create Session yytops ${yytops} headers=${operation_backend_header} ${username} Set Variable liangjinman@qniao.cn ${password} Set Variable qn123456 &{body} Create Dictionary username=${username} password=${password} #&{body} Create Dictionary username=${username_operate} password=${password_operate} ${response} POST On Session yytops /cloud-factory-operation-backend/admin/login ${body} Log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings 登陆成功 ${response.json()["message"]} ${getlogintoken_operate} get from Dictionary ${response.headers} Authorization Set Global Variable ${getlogintoken_operate} &{operationbackend_header} Create Dictionary Content-Type=application/json;charset=UTF-8 X-APP-ID=503258978847952999 Authorization=${getlogintoken_operate} Set Global Variable ${operationbackend_header} get_operate_userinfo Create Session yytops ${yytops} headers=${operationbackend_header} ${response} Get On Session yytops /cloud-factory-operation-backend/admin/employee/get/login-info log ${response.json()} Should Be Equal As Numbers 200 ${response.status_code} Should Be Equal As Strings successful ${response.json()["message"]} Should Be Equal As Strings 管理员 ${response.json()["data"]["positionList"][0]["name"]} ${operate_adminid} Get From Dictionary ${response.json()["data"]} adminId ${operate_adminname} Get From Dictionary ${response.json()["data"]} name Set Global Variable ${operate_adminid} Set Global Variable ${operate_adminname}