Ravik
12 years agoSuper Contributor
Calling Object from one unit to another unit.
Hi All,
I want to call, Object from one unit to another unit. I have define Unit A and Unit B
in Unit A I have search something. like
Sub Test
Dim cmbLnkDropDown
cmblnkPropName = Array("ObjectType","ObjectIdentifier")
cmblnkPropVal = Array("Select","cmbLinkages")
Set cmbLnkDropDown = Sys.Process("iexplore", 2).Page(aqString.Concat(Project.Variables.URL,"*")).Panel("main").FindChild(cmblnkPropName,cmblnkPropVal,100)
End Sub
Unit A Run SuccessFully
Now I want to call Object of Unit A into Unit B like below -
Sub Test2
UnitA.Test ---------(This Statement run successfully)
IF cmbLnkDropDown.Exists Then -------(Throw Exception- Object Required)
log.Message("You Done")
Else
log.Message("Well Try")
End If
End Sub
Is there any way to call object from one unit to another unit,
Please suggest, thanks for Help in Advance.
I want to call, Object from one unit to another unit. I have define Unit A and Unit B
in Unit A I have search something. like
Sub Test
Dim cmbLnkDropDown
cmblnkPropName = Array("ObjectType","ObjectIdentifier")
cmblnkPropVal = Array("Select","cmbLinkages")
Set cmbLnkDropDown = Sys.Process("iexplore", 2).Page(aqString.Concat(Project.Variables.URL,"*")).Panel("main").FindChild(cmblnkPropName,cmblnkPropVal,100)
End Sub
Unit A Run SuccessFully
Now I want to call Object of Unit A into Unit B like below -
Sub Test2
UnitA.Test ---------(This Statement run successfully)
IF cmbLnkDropDown.Exists Then -------(Throw Exception- Object Required)
log.Message("You Done")
Else
log.Message("Well Try")
End If
End Sub
Is there any way to call object from one unit to another unit,
Please suggest, thanks for Help in Advance.
- Declare your object as Public as shown below. this you should declare outside your test.
Public cmbLnkDropDown
Sub Test
----
---
End Sub