1976年贪婪的嘴唇,韩国少妇激三级做爰2023电影,久久久久久精品国产三级涨奶,妖精漫画在线观看免费漫画下拉式

VBScript 常用函數總結
來源:易賢網 閱讀:1455 次 日期:2016-07-18 11:48:44
溫馨提示:易賢網小編為您整理了“VBScript 常用函數總結”,方便廣大網友查閱!

下面總結的VBScript中常用的函數及其用法。

1,GetROProperty

說明:You use the GetROProperty method to retrieve the current value of a test object property from a run-time object in your application.

一般來說,所有的對象都可以使用此方法得到運行時對象的實際值。

語法:object.GetROProperty (Property, [PropertyData])

如 ButtonName=Browser("QA Home Page")。Page("QA Home Page")。WebButton("Submit")。GetTOProperty("Name")

2,WaitProperty

說明:Waits until the specified object property achieves the specified value or exceeds the specified timeout before continuing to the next step.

此方法可以解決由于等待系統進行處理某些操作或網絡原因引起的測試對象同步問題。

語法:object.WaitProperty (PropertyName, PropertyValue, [TimeOut])

Window("Test")。Static("Status:")。WaitProperty "text", "Ready", 30000

3,Instr

Returns the position of the first occurrence of one string within another.

可以得到一個字符串在另外一個字符串中首次出現的位置。

語法: InStr([start, ]string1, string2[, compare])

4,Split

Returns a zero-based, one-dimensional array containing a specified number of substrings.

此函數可以把原來用某個特殊字符串連接起來的字符串分割開,得到一個一維的數組。

5,UBound

Returns the largest available subscript for the indicated dimension of an array.

得到某個維度的最大值。

6,Trim

Returns a copy of a string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (Trim)。

如果需要刪除字符串左邊的所有空格,那么可以使用LTrim 函數;如果需要刪除字符串右邊的所有空格,那么可以使用RTrim 函數。如果需要刪除字符串左邊和右邊的所有空格,那么可以使用Trim 函數。

7,Ucase

Returns a string that has been converted to uppercase.

此函數可以把所有的字符都轉換成相應的大寫。

8,LCase

Returns a string that has been converted to lowercase.

此函數可以把所有的字符都轉換成相應的小寫。

9,Cstr

Returns an expression that has been converted to a Variant of subtype String.

由于VBScript只有一種類型Variant,你可以使用此函數把某個變量強制轉換成String類型。

10,CInt

Returns an expression that has been converted to a Variant of subtype Integer.

由于VBScript只有一種類型Variant,你可以使用此函數把某個變量強制轉換成Integer類型。

在描述性編程語句中,最常用的函數有:

11,Create

這是創建一類或一個對象時必須要使用的方法。

12,ChildObjects

使用此方法可以得到符合某些條件的一類對象的集合。

13,Count

使用使用此方法可以得到符合某些條件的一類對象的個數。

The following example uses the Create method to return a Properties collection object named EditDescription, and then uses the returned object to instruct QuickTest to enter the text: MyName in the first WebEdit object in the Mercury Tours page with the name UserName.

Set EditDesc = Description.Create()

EditDesc("micclass")。Value = "WebEdit"

EditDesc("Name")。Value = "userName"

Set Lists = Browser("Welcome: Mercury")。Page("Welcome: Mercury")。ChildObjects(EditDesc)

NumberOfLists = Lists.Count()

If NumberOfLists > 0 Then

Browser("Welcome: Mercury")。Page("Welcome: Mercury")。Lists(0)。Set "MyName"

End If

一些具體的用法可以在 QTP的幫助里面找到。 個人的建議是:你最好按照 QTP里面提供的例子,自己使用這些函數自己寫幾行語句,運行后看一下運行結果,結合QTP幫助里面的說明,這樣學習會快,也記得牢固。

在輸出結果時, 常用的函數有 Msgbox 和 Print 函數。Msgbox 函數在 QTP8.2 及其以上版本都可以使用;Print 函數需要在 QTP 9.2 版本上使用,QTP 8.2 不支持此函數,不知道 QTP 9.0是否支持此函數。

希望大家共同總結一下,一起進步。

更多信息請查看腳本欄目
易賢網手機網站地址:VBScript 常用函數總結
由于各方面情況的不斷調整與變化,易賢網提供的所有考試信息和咨詢回復僅供參考,敬請考生以權威部門公布的正式信息和咨詢為準!

2026國考·省考課程試聽報名

  • 報班類型
  • 姓名
  • 手機號
  • 驗證碼
關于我們 | 聯系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
工業和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
云南網警備案專用圖標
聯系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網
云南網警報警專用圖標
主站蜘蛛池模板: 买车| 阿城市| 鹿泉市| 兰西县| 彭州市| 北票市| 博爱县| 梁河县| 武威市| 兴城市| 五大连池市| 剑阁县| 衡阳市| 定结县| 四子王旗| 南昌县| 新竹市| 老河口市| 思南县| 柳江县| 蓝山县| 潮州市| 通城县| 紫云| 拜城县| 牟定县| 剑川县| 苍山县| 闸北区| 西安市| 枝江市| 高邮市| 天气| 蒲江县| 泽州县| 开远市| 静安区| 瓮安县| 顺昌县| 天祝| 乐昌市|