脚本中找不到需要关联的值
Response返回值中确实有需要关联的值,但是在脚本中找不到这个值,这怎么在脚本中做关联啊? 我的脚本是要录制一个在线编辑文档的功能,在打开文档时会产生一个动态字符处,在往服务器提交编辑保存时,会用到这个动态字符串。我的问题是,在response返回信息里面,我能查到产生的动态字符串,但是在脚本里却找不到这个值,我该怎么做关联呢。 贴点脚本代码出来:Action()
{...
lr_start_transaction("打开文档");
web_custom_request("word2009-118110kV.doc",
"URL=http://10.138.215.239:7001/webdav/files/word2009-118110kV.doc",
"Method=LOCK",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t9.inf",
"Mode=HTML",
"Body=<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n"
"<lockinfo xmlns=\"DAV:\">\r\n"
"<locktype>\r\n"
"<write/>\r\n"
"</locktype>\r\n"
"<lockscope>\r\n"
"<exclusive/>\r\n"
"</lockscope>\r\n"
"<owner>Administrator</owner>\r\n"
"</lockinfo>\r\n",
EXTRARES,
"URL=word2009-118110kV.doc", ENDITEM,
LAST);
//在线打开一个文档时,会产生一个动态字符串token,在下面保存文档时用来唯一标识文档
...
lr_end_transaction("打开文档", LR_AUTO);
lr_start_transaction("保存");
web_custom_request("files",
"URL=http://10.138.215.239:7001/webdav/files",
"Method=OPTIONS",
"TargetFrame=",
"Resource=0",
"Referer=",
"Mode=HTML",
LAST);
web_custom_request("word2009-118110kV.doc_3",
"URL=http://10.138.215.239:7001/webdav/files/word2009-118110kV.doc",
"Method=PROPFIND",
"TargetFrame=",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t10.inf",
"Mode=HTML",
"Body=<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n"
"<a:propfind xmlns:a=\"DAV:\" xmlns:b=\"urn:schemas-microsoft-com:datatypes\">\r\n"
"<a:prop xmlns:c=\"urn:schemas-microsoft-com:office:office\">\r\n"
"<c:save-profile-form-location/>\r\n"
"</a:prop>\r\n"
"</a:propfind>\r\n",
LAST);
//在上面这段代码中,保存编辑后的文档时,会用到前面产生的动态字符串token
...
lr_end_transaction("保存", LR_AUTO);
lr_start_transaction("关闭文档");
web_custom_request("word2009-118110kV.doc_6",
"URL=http://10.138.215.239:7001/webdav/files/word2009-118110kV.doc",
"Method=UNLOCK",
"TargetFrame=",
"Resource=1",
"Referer=",
LAST);
lr_end_transaction("关闭文档", LR_AUTO);
return 0;
}
页:
[1]