八犬传图片人物合照:有关Environment Variable的一些用法
来源:百度文库 编辑:偶看新闻 时间:2024/04/28 04:55:02
如何检查Environment Variable是否存在
Public Function IsEnvExist(ByVal varName) IsEnvExist = True
On Error Resume Next
Dim envVal envVal = Environment(varName)
If err.number<>0 Then
IsEnvExist = False End If
On Error Goto 0End Function
msgBox IsEnvExist("Invalid")
有关Environment Variable被赋值
If we try to use Set to assign an object to the Environment Variable, 'Type mismatch' exception is raised.
1. use a string definition of the object and then convert it to an object 2. assign the object to the variable without using the Set
Method 1
Environment("BrowserObj") = "Browser(""creationtime:=0"")"
Dim objBrowser
Excute "set objBrowser = "& Environment("BrowserObj")
objBrowser.close
Method2Environment("BrowserObj") = Browser("creationtime:=0")Dim objBrowser
set objBrowser = Environment("BrowserObj")
objBrowser.close
How an array is passed using Environment Variable
QTP throws a "this array is fixed or temporarily locked" exception, if we try to pass a fixed length array using Environment Variable.
Dim fixedArr(3)
For i = LBound(fixedArr,1) to UBound(fixedArr,1) fixedArr(i) = Cstr(i)Next
Dim dynArrdynArr = fixedArr
Environment.Value("passArray") = dynArr
Public Function IsEnvExist(ByVal varName) IsEnvExist = True
On Error Resume Next
Dim envVal envVal = Environment(varName)
If err.number<>0 Then
IsEnvExist = False End If
On Error Goto 0End Function
msgBox IsEnvExist("Invalid")
有关Environment Variable被赋值
If we try to use Set to assign an object to the Environment Variable, 'Type mismatch' exception is raised.
1. use a string definition of the object and then convert it to an object 2. assign the object to the variable without using the Set
Method 1
Environment("BrowserObj") = "Browser(""creationtime:=0"")"
Dim objBrowser
Excute "set objBrowser = "& Environment("BrowserObj")
objBrowser.close
Method2Environment("BrowserObj") = Browser("creationtime:=0")Dim objBrowser
set objBrowser = Environment("BrowserObj")
objBrowser.close
How an array is passed using Environment Variable
QTP throws a "this array is fixed or temporarily locked" exception, if we try to pass a fixed length array using Environment Variable.
Dim fixedArr(3)
For i = LBound(fixedArr,1) to UBound(fixedArr,1) fixedArr(i) = Cstr(i)Next
Dim dynArrdynArr = fixedArr
Environment.Value("passArray") = dynArr
如何写有关E有关Environment的口语英语作文
急求英语辩论材料:有关Economical development与natural environment
how to protect environment
MS Development Environment
ecnomic develoement and environment
what is environment problem
fullduplex environment是什么意思?
circumstance和environment区别
“protect the Environment”是什么意思?
MS Development Environment
没有安装MS Development Environment?
PrebootExecution Environment是什么意思。。在线呢。。
J2SE Runtime Environment 能不能删掉?
circumstance和environment的区别?
Microsoft Development Environment 是什么软件?
economics is important than environment?
请教 Near Environment 中文 解释
a stimulating environment是什么意思啊?
Could not create an environment
LIVING ENVIRONMENT的问题(英文的)
microsoft development environment是什么软件?谢谢
Unable to load development environment Dll
怎样使用microsoft development environment软件?谢谢
寻找关于ENVIRONMENT的英文文章