lr无法直接录制https请求,如非要录制可使用firefox录制
* 脚本前面加web_set_sockets_option("SSL_VERSION","TLS");
* 添加证书
* 直接走http,让开发不开启https
* 特点:只能发送get请求,不能发送post请求
* 步骤:如下
* 脚本:如下
web_set_sockets_option("SSL_VERSION","TLS");//https安全处理 //检查点 web_reg_find("Text=p5837.jpg",LAST); web_url("web_url", "URL=https://api.douban.com/v2/movie/top250?start=0&count=10", "TargetFrame=", "Resource=0", "Referer=", "Mode=HTTP",LAST);
* 特点:适用于Get和Post请求
* 使用说明:
* Get请求,参数直接放在url里,Post请求参数放在body里
* 参数格式:{key:value,key:value},如"Body={\"q\":\"python\",\"start\":0}"
* 参数里int类型不需要加引号
* body支持json形式参数
* 步骤:如下
* 脚本:如下
web_custom_request("web_custom_request", "URL=https://api.douban.com/v2/movie/top250?start=0&count=10", "Method=GET", "TargetFrame=", "Resource=0", "Referer=", "Mode=HTTP", "Body=", LAST);* 特点:支持get、post请求,且更多用于post请求
* get请求使用说明
* post请求使用说明:参数放在itermdata里,如下图
* get脚本
web_submit_data("web_submit_data", "Action=https://api.douban.com/v2/movie/top250?start=0&count=10", "Method=GET", "TargetFrame=", "Referer=", "Mode=HTTP", ITEMDATA, LAST);* post脚本
web_submit_data("web_submit_data", "Action=https://api.douban.com/v2/movie/top250", "Method=POST", "TargetFrame=", "Referer=", "Mode=HTTP", ITEMDATA, "Name=start", "Value=0", ENDITEM, "Name=count", "Value=10", ENDITEM, LAST);