Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
light example
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
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:

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
Reply


Messages In This Thread
light example - by Amit Singh Chauhan - 06-04-2008, 06:54 PM
RE: light example - by somisays - 06-05-2008, 12:38 AM
RE: light example - by Amit Singh Chauhan - 06-05-2008, 09:44 AM
RE: light example - by Anshoo Arora - 06-05-2008, 04:09 AM
RE: light example - by Anshoo Arora - 06-05-2008, 10:18 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)