2015-06-20 20 views
0

這應該是一個非常簡單的修復方法,我根本無法弄清楚並且需要幫助。我有一個記錄提交記錄的腳本。當用戶點擊提交按鈕時,此記錄提交會生成一個唯一的ID。生成的ID用於新表單。Hp VuGen 11.5基本相關空白值

在過去,我可以簡單地使用'web_reg_save_param',值將被保存。但是,在這種情況下,直到記錄提交後纔會給出該值。所以我無法像過去那樣從URL中捕獲它。

下面記錄什麼,然後我已經包括我已經嘗試過,並在調試中的警告消息。請讓我知道是否需要進一步澄清。

預先感謝您。

web_submit_data("subpage", 
"Action=somewebsite.com/subpage", 
"Method=POST", 
"RecContentType=text/html", 
"Referer=somewebsite.com/subpage?id=xxxxx1", 
"Mode=HTML", 
ITEMDATA, 
//this value is what I need to be correlated 
"Name=recordID", "Value=c39d54a59112fcb223978bb6869d47d2", ENDITEM, 
//other values that are present on the form which can be reused 
"Name=variable", "Value=someValue", ENDITEM, 
LAST); 

I've tried to do the following - 

web_reg_save_param("ID","LB=recordID=","RB=&","Search=All","NotFound=ERROR",LAST); 
web_submit_data("subpage", 
"Action=somewebsite.com/subpage", 
"Method=POST", 
"RecContentType=text/html", 
"Referer=somewebsite.com/subpage?id=xxxxx1", 
"Mode=HTML", 
ITEMDATA, 
//this value is what I need to be correlated 
"Name=recordID", "Value={ID}", ENDITEM, 
//other values that are present on the form which can be reused 
"Name=variable", "Value=someValue", ENDITEM, 
LAST); 

But the "ID" is coming up as blank. 
Warning: The string 'ID' with parameter delimiters is not a parameter. 

回答

0

我能夠使用:

web_reg_save_param_ex(
    "ParamName=recordID", 
    "LB=id=\"id\" value=\"", 
    "RB=\" type", 
    SEARCH_FILTERS, 
    "Scope=Body", 
    "IgnoreRedirections=No", 
    "RequestUrl=*/subpage*", 
    LAST);