${EXECDIR}\\DA_data.yaml Imports a variable file with the given path and optional arguments. ${EXECDIR}\\DA_data.yaml Imports a variable file with the given path and optional arguments. ${file} D:\\LYL\\Study\\Robot_framework\\space\\Dating-agency\\0-Login\\phone-test.txt Returns the contents of a specified file. Getting file '<a href="file://D:\LYL\Study\Robot_framework\space\Dating-agency\0-Login\phone-test.txt">D:\LYL\Study\Robot_framework\space\Dating-agency\0-Login\phone-test.txt</a>'. ${file} = 手机号 19128859944 ${skip-line} 1 Returns the given values which can then be assigned to a variables. ${skip-line} = 1 ${lines} -1 Returns the given values which can then be assigned to a variables. ${lines} = -1 ${content} ${file} ${skip-line} ${lines} Returns lines of the given ``string`` that contain the ``pattern``. 1 out of 2 lines matched ${content} = 19128859944 ${id} ${content} 19128859944 ${id} ${id} \n Splits the ``string`` using ``separator`` as a delimiter string. ${id} = ['19128859944'] ${id} Makes a variable available globally in all tests and suites. ${id} = ['19128859944'] ${userid_list} Returns a list containing given items. ${userid_list} = [] ${Cheader_list} Returns a list containing given items. ${Cheader_list} = [] ${Aheader_list} Returns a list containing given items. ${Aheader_list} = [] ${phoneList} Returns a list containing given items. ${phoneList} = [] ${account} @{id} 19128859944 Helper for quickly disabling all urllib3 warnings. dating ${${dating}.dating域名} ${${dating}.AHeader} Create Session: create a HTTP session to a server Creating Session using : alias=dating, url=http://dating-agency-api-test.qniao.cn, headers={'Content-Type': 'application/json', 'X-APP-ID': '50325897884795881'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 Creating session: dating ${data} { \ \ "account":"${account}", \ \ "accountType":2, \ \ "captcha":888888 } Returns the given values which can then be assigned to a variables. ${data} = { "account":"19128859944", "accountType":2, "captcha":888888 } ${reps} dating /dating-agency-uec/authorize/by-captcha ${data.encode('utf-8')} Sends a POST request on a previously created HTTP Session. Starting new HTTP connection (1): dating-agency-api-test.qniao.cn http://dating-agency-api-test.qniao.cn:80 "POST /dating-agency-uec/authorize/by-captcha HTTP/1.1" 200 None POST Request : url=http://dating-agency-api-test.qniao.cn/dating-agency-uec/authorize/by-captcha path_url=/dating-agency-uec/authorize/by-captcha headers={'User-Agent': 'python-requests/2.15.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'X-APP-ID': '50325897884795881', 'Content-Length': '68'} body=b'{ "account":"19128859944", "accountType":2, "captcha":888888 }' POST Response : url=http://dating-agency-api-test.qniao.cn/dating-agency-uec/authorize/by-captcha status=200, reason= headers={'Server': 'nginx/1.16.1', 'Date': 'Wed, 21 Aug 2024 09:48:29 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers'} body={"code":0,"message":"successful","data":{"token":"iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==","userId":"986635834872696832"}} ${reps} = <Response [200]> ${code} ${reps.json()} code Returns a value from the given ``dictionary`` based on the given ``key``. ${code} = 0 ${token} ${reps.json()['data']} token Returns a value from the given ``dictionary`` based on the given ``key``. ${token} = iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg== ${userId} ${reps.json()['data']} userId Returns a value from the given ``dictionary`` based on the given ``key``. ${userId} = 986635834872696832 ${message} ${reps.json()} message Returns a value from the given ``dictionary`` based on the given ``key``. ${message} = successful ${login_header} {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT ${token}','X-Organization-Id':'963432943739605555'} Returns the given values which can then be assigned to a variables. ${login_header} = {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==','X-Organization-Id':'96... ${login_header} Logs the given message with the given level. {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==','X-Organization-Id':'963432943739605555'} ${client_header} {'Content-Type':'application/json','X-APP-ID':'50325897884795883','Authorization':'${token}'} Returns the given values which can then be assigned to a variables. ${client_header} = {'Content-Type':'application/json','X-APP-ID':'50325897884795883','Authorization':'iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg=='} ${userid_list} ${userId} Adds ``values`` to the end of ``list``. ${Cheader_list} ${client_header} Adds ``values`` to the end of ``list``. ${Aheader_list} ${login_header} Adds ``values`` to the end of ``list``. ${phoneList} ${account} Adds ``values`` to the end of ``list``. ${code}==0 Should Be Equal As Strings ${message} successful ELSE Should Be Equal As Strings ${message} 验证码错误或无效验证码,请重试! Runs the given keyword with the given arguments, if ``condition`` is true. ${message} successful Fails if objects are unequal after converting them to strings. Argument types are: <class 'str'> <class 'str'> ${phoneList} Makes a variable available globally in all tests and suites. ${phoneList} = ['19128859944'] ${userid_list} Makes a variable available globally in all tests and suites. ${userid_list} = ['986635834872696832'] ${Aheader_list} Makes a variable available globally in all tests and suites. ${Aheader_list} = ["{'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==','X-Organization-Id':'... ${Cheader_list} Makes a variable available globally in all tests and suites. ${Cheader_list} = ["{'Content-Type':'application/json','X-APP-ID':'50325897884795883','Authorization':'iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg=='}"] ${login_header} Makes a variable available globally in all tests and suites. ${login_header} = {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==','X-Organization-Id':'96... ${client_header} Makes a variable available globally in all tests and suites. ${client_header} = {'Content-Type':'application/json','X-APP-ID':'50325897884795883','Authorization':'iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg=='} ${Aheader} Returns a list containing given items. ${Aheader} = [] ${userId} ${login_header} ${userid_list} ${Aheader_list} 986635834872696832 {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==','X-Organization-Id':'96... Helper for quickly disabling all urllib3 warnings. dating ${${dating}.dating域名} ${login_header} Create Session: create a HTTP session to a server Creating Session using : alias=dating, url=http://dating-agency-api-test.qniao.cn, headers={'Content-Type': 'application/json', 'X-APP-ID': '50325897884795881', 'Authorization': 'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==', 'X-Organization-Id': '963432943739605555'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 Creating session: dating ${reps} dating /dating-agency-uec/user/list/own-organization params=userId=${userid} Sends a GET request on a previously created HTTP Session. Starting new HTTP connection (1): dating-agency-api-test.qniao.cn http://dating-agency-api-test.qniao.cn:80 "GET /dating-agency-uec/user/list/own-organization?userId=986635834872696832 HTTP/1.1" 200 None GET Request : url=http://dating-agency-api-test.qniao.cn/dating-agency-uec/user/list/own-organization?userId=986635834872696832 path_url=/dating-agency-uec/user/list/own-organization?userId=986635834872696832 headers={'User-Agent': 'python-requests/2.15.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'X-APP-ID': '50325897884795881', 'Authorization': 'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==', 'X-Organization-Id': '963432943739605555'} body=None utf-8 confidence = 0.99 SHIFT_JIS Japanese confidence = 0.01 EUC-JP Japanese confidence = 0.01 GB2312 Chinese confidence = 0.01 EUC-KR Korean confidence = 0.01 CP949 Korean confidence = 0.01 Big5 Chinese confidence = 0.01 EUC-TW Taiwan confidence = 0.01 windows-1251 Russian confidence = 0.01 KOI8-R Russian confidence = 0.01 ISO-8859-5 Russian confidence = 0.0 MacCyrillic Russian confidence = 0.0 IBM866 Russian confidence = 0.0 IBM855 Russian confidence = 0.0 ISO-8859-7 Greek confidence = 0.0 windows-1253 Greek confidence = 0.0 ISO-8859-5 Bulgairan confidence = 0.0 windows-1251 Bulgarian confidence = 0.0 TIS-620 Thai confidence = 0.20561212116352198 ISO-8859-9 Turkish confidence = 0.24977335999371533 windows-1255 Hebrew confidence = 0.0 windows-1255 Hebrew confidence = 0.0 windows-1255 Hebrew confidence = 0.0 utf-8 confidence = 0.99 SHIFT_JIS Japanese confidence = 0.01 EUC-JP Japanese confidence = 0.01 GB2312 Chinese confidence = 0.01 EUC-KR Korean confidence = 0.01 CP949 Korean confidence = 0.01 Big5 Chinese confidence = 0.01 EUC-TW Taiwan confidence = 0.01 GET Response : url=http://dating-agency-api-test.qniao.cn/dating-agency-uec/user/list/own-organization?userId=986635834872696832 status=200, reason= headers={'Server': 'nginx/1.16.1', 'Date': 'Wed, 21 Aug 2024 09:48:29 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers'} body={"code":0,"message":"successful","data":[{"orgId":"963432943739605555","fullName":"xxx","shortName":null},{"orgId":"1023568243073355776","fullName":"婚恋一级代理商2024-08-21","shortName":null}]} ${reps} = <Response [200]> ${data} ${reps.json()} data Returns a value from the given ``dictionary`` based on the given ``key``. ${data} = [{'orgId': '963432943739605555', 'fullName': 'xxx', 'shortName': None}, {'orgId': '1023568243073355776', 'fullName': '婚恋一级代理商2024-08-21', 'shortName': None}] ${message} ${reps.json()} message Returns a value from the given ``dictionary`` based on the given ``key``. ${message} = successful ${message} successful Fails if objects are unequal after converting them to strings. Argument types are: <class 'str'> <class 'str'> ${data}==[] log 未获取到组织信息! ELSE log ${data} Runs the given keyword with the given arguments, if ``condition`` is true. ${data} Logs the given message with the given level. [{'orgId': '963432943739605555', 'fullName': 'xxx', 'shortName': None}, {'orgId': '1023568243073355776', 'fullName': '婚恋一级代理商2024-08-21', 'shortName': None}] ${matchmakerFlagList} Returns a list containing given items. ${matchmakerFlagList} = [] ${admin_header} @{Aheader_list} {'Content-Type':'application/json','X-APP-ID':'50325897884795881','Authorization':'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==','X-Organization-Id':'96... dating ${${dating}.dating域名} ${admin_header} Create Session: create a HTTP session to a server Creating Session using : alias=dating, url=http://dating-agency-api-test.qniao.cn, headers={'Content-Type': 'application/json', 'X-APP-ID': '50325897884795881', 'Authorization': 'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==', 'X-Organization-Id': '963432943739605555'}, cookies={}, auth=None, timeout=None, proxies=None, verify=False, debug=0 Creating session: dating ${reps} dating dating-agency-uec/user/get/base-info Sends a GET request on a previously created HTTP Session. Starting new HTTP connection (1): dating-agency-api-test.qniao.cn http://dating-agency-api-test.qniao.cn:80 "GET /dating-agency-uec/user/get/base-info HTTP/1.1" 200 None GET Request : url=http://dating-agency-api-test.qniao.cn/dating-agency-uec/user/get/base-info path_url=/dating-agency-uec/user/get/base-info headers={'User-Agent': 'python-requests/2.15.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive', 'Content-Type': 'application/json', 'X-APP-ID': '50325897884795881', 'Authorization': 'QNT iHP4V/g6O5DXHixyNrf7tr3eQtrvwg2p35xl6PEP5oXQAFWFoSX6Kg5PODTEDTN9889dTzl/+I4BGak0mlytLg==', 'X-Organization-Id': '963432943739605555'} body=None GET Response : url=http://dating-agency-api-test.qniao.cn/dating-agency-uec/user/get/base-info status=200, reason= headers={'Server': 'nginx/1.16.1', 'Date': 'Wed, 21 Aug 2024 09:48:29 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Origin, Access-Control-Request-Method, Access-Control-Request-Headers'} body={"code":0,"message":"successful","data":{"userId":"986635834872696832","realName":"qianniao","nickName":null,"phone":"19128859944","matchmakerFlag":false}} ${reps} = <Response [200]> ${phone} ${reps.json()['data']} phone Returns a value from the given ``dictionary`` based on the given ``key``. ${phone} = 19128859944 ${matchmakerFlag} ${reps.json()['data']} matchmakerFlag Returns a value from the given ``dictionary`` based on the given ``key``. ${matchmakerFlag} = False ${matchmakerFlagList} ${matchmakerFlag} Adds ``values`` to the end of ``list``. ${phone} Makes a variable available globally in all tests and suites. ${phone} = 19128859944 ${matchmakerFlag} Makes a variable available globally in all tests and suites. ${matchmakerFlag} = False ${matchmakerFlagList} Makes a variable available globally in all tests and suites. ${matchmakerFlagList} = [False] 接口:短信验证码登录认证 用户登录婚介平台 All Tests Dating-agency Dating-agency.0-Login Dating-agency.0-Login.Login-interface