軟件測試工具QTP獲取瀏覽器屬性的方法

發表于:2009-05-26來源:作者:點擊數: 標簽:軟件測試工具qtpQTP瀏覽器
獲取瀏覽器屬性的方法: Dimobj,tempValue ’獲得窗體對象 setobj=Browser(\"CreationTime:=1\").Page(\"index:=\").Object.parentWindow ’獲取瀏覽器的當前語言。 tempValue=obj.clientInformation.browserLanguage print(tempValue) ’獲取瀏覽器的名稱。
獲取瀏覽器屬性的方法:

Dim obj,tempValue
 ’獲得窗體對象
set obj = Browser(\"CreationTime:=1\").Page(\"index:=\").Object.parentWindow
 ’獲取瀏覽器的當前語言。
tempValue = obj.clientInformation.browserLanguage
print(tempValue)
 ’獲取瀏覽器的名稱。
tempValue = obj.clientInformation.appName
print(tempValue)
 ’獲取瀏覽器運行的平臺和版本。
tempValue = obj.clientInformation.appVersion
print(tempValue)
 ’獲取用戶的操作系統名稱。
tempValue = obj.clientInformation.platform
print(tempValue)
 ’獲取操作系統適用的默認語言。
tempValue = obj.clientInformation.systemLanguage
print(tempValue)
 ’獲取瀏覽器的代碼名稱。
tempValue = obj.clientInformation.appCodeName
print(tempValue)
 ’獲取指示 CPU 等級的字符串。
tempValue = obj.clientInformation.cpuClass
print(tempValue)
 ’獲取表明系統是否處于全局脫機模式的值。
tempValue = obj.clientInformation.onLine
print(tempValue)
 ’獲取等同于 HTTP 用戶代理請求頭的字符串。
tempValue = obj.clientInformation.userAgent
print(tempValue)

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97