06-05-2008, 04:09 AM
(This post was last modified: 06-05-2008, 04:17 AM by Anshoo Arora.)
You are using one object reference in your script and using that object reference to point to the object under test.
It should be like this:
For WinEdit and WinButton: You have not defined what 'obj_Dialog' is. The description for Dialog is pointing to an illegal description. Remember that you are not transferring the description of the Dialog Box to these two Subs. This is one way it can be done:
It should be like this:
Code:
Public Sub DPDialog(strlnDialogName,strnProp)
Set obj_Dialog = Description.Create
obj_Dialog ("micclass").value = "Dialog"
obj_Dialog ("regexpwndtitle").value= strlnDialogName
If strnProp = "Click" Then ' Click Property
Dialog(obj_Dialog).Click
End If
End Sub
For WinEdit and WinButton: You have not defined what 'obj_Dialog' is. The description for Dialog is pointing to an illegal description. Remember that you are not transferring the description of the Dialog Box to these two Subs. This is one way it can be done:
Code:
Public sub DPWinEdit(strenWinEdit,strlnDialogName,strlnValue,strnProp)
Set obj_WinEdit = Description.Create
obj_WinEdit ("Class Name").value = "WinEdit"
obj_WinEdit ("attached text").value= strenWinEdit
Set obj_Dialog = Description.Create
obj_Dialog ("Class Name").value = "Dialog"
obj_Dialog ("regexpwndtitle").value= strlnDialogName
If strnProp = "Set" Then ' Set Property
Dialog(obj_Dialog).WinEdit(obj_WinEdit).Set strlnValue
End If
End Sub