10-10-2018, 08:56 PM
(This post was last modified: 10-10-2018, 08:57 PM by TheGlovner.)
First post so hopefully this makes sense.
I've been given my first tasks within UFT having moved into a new role (previous experience was mainly using VBA and SQL within the Excel Environment, so have an understanding of classe module objects within the VBA Structure).
I'm keen to use the descriptive programming concept within the cases being designed so we can encapsulate the object recognition in the class itself, not sure if this is doable though.
The above is an extract of the external function library being used to host the class code.
The structure of the program is:
-High Level Test Script (which loads)
- Pre Processing Function Library (Which sets up various file paths according to the local install of the git directory, which also loads)
- Application Class
The application class once instantiated in the Pre Processing Function Library is then passed back up to high level test script for use.
I was then calling the Initialisation routine from the high level test script thinking this would create the window object that I could reference from the class object, but none of these lines of code work.
Hoping someone can shed some light on this and if what I'm doing is possible within UFT.
Thanks.
I've been given my first tasks within UFT having moved into a new role (previous experience was mainly using VBA and SQL within the Excel Environment, so have an understanding of classe module objects within the VBA Structure).
I'm keen to use the descriptive programming concept within the cases being designed so we can encapsulate the object recognition in the class itself, not sure if this is doable though.
Code:
option explicit
Function ApplicationClassCreation
ApplicationClassCreation = new Application
End Function
Class Application
Public Window
Sub Initialise
Set SPICEWindow = Description.Create
Window("Class") = "SwfWindow"
Window("swfname") = "ShellUI"
Window("regexpwndtitle") = "SPICE (Environment: Syst)"
Window("is owned window") = False
Window("is child window") = False
End sub
End Class
The above is an extract of the external function library being used to host the class code.
The structure of the program is:
-High Level Test Script (which loads)
- Pre Processing Function Library (Which sets up various file paths according to the local install of the git directory, which also loads)
- Application Class
The application class once instantiated in the Pre Processing Function Library is then passed back up to high level test script for use.
I was then calling the Initialisation routine from the high level test script thinking this would create the window object that I could reference from the class object, but none of these lines of code work.
Hoping someone can shed some light on this and if what I'm doing is possible within UFT.
Thanks.