web_url 語法: Int Web_url(const char *name, const char * url, Lists of Attributes, [EXTRARES,Lists of Resource Attributes,LAST) 返回值 成功時返回 LR _PASS (0) ,失敗時返回 LR_FAIL (1) 。 參數: Name : VuGen 中樹形視圖中顯示" name="description" />
Int Web_url(const char *name, const char * url, <Lists of Attributes>, [EXTRARES,<Lists of Resource Attributes>,LAST)
成功時返回LR_PASS (0),失敗時返回 LR_FAIL (1)。
Name:VuGen中樹形視圖中顯示的名稱,在自動事務處理中也可以用做事務的名稱。
url:頁面url地址。
List of Attributes
EXTRARES:分隔符,標記下一個參數是資源屬性的列表了。
List of Resource Attributes
LAST:屬性列表結束的標記符。
Web_url根據函數中的URL屬性加載對應的URL,不需要上下文。
只有VuGen處于URL-based或者HTML-based(此時A script containing explicit URLs only選項被選中時)的錄制模式時,web_url才會被錄制到。
可以使用web_url 模擬從FTP服務器上下載文件。web_url 函數會使FTP服務器執行文件被真實下載時的操作。除非手工指定了"FtpAscii=1",下載會以二進制模式完成。
在錄制選項中,Toos—Recording Option下,Recording選項中,有一個Advanced HTML選項,可以設置是否錄制非HTML資源,只有選擇了“Record within the current script step”時,List of Resource Attributes才會被錄制到。非HTML資源的例子是gif和jpg圖象文件。
通過修改HTTP頭可以傳遞給服務器一些附加的請求信息。使用HTTP頭允許請求中包含其他的內容類型(Content_type),象壓縮文件一樣。還可以只請求特定狀態下的web頁面。
所有的Web Vusers ,HTTP模式下的WAP Vusers或者回放模式下的Wireless Session Protocol(WSP),都支持web_url函數。
原文轉自:http://www.anti-gravitydesign.com