Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DP Encapsulation Within Class Object
#2
Solved: 5 Years, 7 Months, 3 Weeks ago
Realise that I had made a school-boy error with the above code, so while I can get the lines of code to run now, the created object appears to be of a "collection" type (I'm assuming this because the only methods available to it are Add, Item, Count and Remove which are obviously collection methods).

My expectation was that it would create a window object and give me access at runtime to the methods of a window (.exists).

Here is the updated code:


Code:
Function SpiceClassCreation
    set SpiceClassCreation = new SPICEApplication
End Function

Class SPICEApplication
    
    Public SPICEWindow
    
    Sub Initialise
        Set SPICEWindow = Description.Create
        SPICEWindow("Type").value = "SwfWindow"
        SPICEWindow("swfname").value = "ShellUI"
        SPICEWindow("regexpwndtitle").value = "SPICE (Environment: Syst)"
        SPICEWindow("is owned window").value = False
        SPICEWindow("is child window").value = False
        check = SPICEWindow.Exists
    End  sub
    
    
End Class
Reply


Messages In This Thread
RE: DP Encapsulation Within Class Object - by TheGlovner - 10-11-2018, 02:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic obj rep - get text in the class (html) marcio cravo moreira 0 2,057 05-26-2015, 06:58 PM
Last Post: marcio cravo moreira
  Cannot find the "[ WebEdit ]" object's parent "[ Browser ]" (class Browser). Verify t Divya Roopa 1 8,320 03-11-2014, 12:13 PM
Last Post: devarapallliramana
  can class be a variable in DP wyrdo 1 2,386 08-07-2013, 01:33 PM
Last Post: anil2u
Sad QTP Script | how to get object of some open window just using its class type,Java sophia.sabir 1 8,716 08-07-2013, 01:26 PM
Last Post: anil2u
  Use of Class Concept in QTP sshukla12 6 14,766 12-23-2011, 03:44 PM
Last Post: sshukla12

Forum Jump:


Users browsing this thread: 1 Guest(s)