【软件自动化测试 - VBScript 2】== VBS 函数

1. UCase:<!-- [if gte mso 9]><![endif]--><!-- [if gte mso 9]><![endif]--><!-- [if gte mso 10]>返回字符串的大写形式

 

UCase(string)

eg:

 

  Dim MyWord

  MyWord = UCase("Hello World") <!-- [if gte mso 9]><![endif]--><!-- [if gte mso 9]><![endif]--><!-- [if gte mso 10]>' 返回"HELLO WORLD"

2.

Dim counter,num

counter = 0

num = 9

Do Until num = 10

num = num -1

counter = counter + 1

if num < 9 then Exit Do

Loop

Msgbox "循环了"&counter&"次"

3.


方法一:
Dim res, WSH
Set WSH = CreateObject("WScript.Shell")
res = WSH.Popup("Closed dialog.", 2)  '代替msgbox "close dialog"
Set WSH = Nothing

方法二:
Set Msg=Description.create()
msg("text").value="MsgBox Example"
dialog(msg).close

你可能感兴趣的:(【软件自动化测试 - VBScript 2】== VBS 函数)