Creating new AppObject classes

Tips and Techniques

Moderators: ZeenyxSupport, blesuer

Post Reply
RochTourigny
Posts: 13
Joined: Thu Mar 01, 2018 12:38 pm

Creating new AppObject classes

Post by RochTourigny »

I was creating a short resumé of my journey with classes and thought I should share this with the community.
This is by no mean a How-to or a Why-to.

BackGround:
I was thinking that one has to see native properties of the appObject in order to successfully create a class, I was wrong.

Even if AT obscures most of the object native properties, it is still possible to create functions that mimic the use of properties.



Even if it is possible to create Step or Functions that are fully functionnal, it is preferable to create a new AppObject class.

By doing this, functionnality is available in the action panel or to intellisence while typing. No more perusing hundreds of Step to find the right one.





Working with libraries:
Create a new Z file, for help, in Ascential Test, open the help, Ascential Test Basics → Working with libraries → The project libraries.

Create the new class

functions declared in the body of the class will appear under the ‘Event’ and ‘Other’ of the action panel


functions declared as property will show in the ‘Verify’, ‘Get’ or ‘Set’ in the action panel

ex:


[ ] // this makes possible the verification of the list from the action panel
[-] property List<String> Contents
[-] get
[ ] return (this.GetContents())

Image
Attachments
ActionPanelOther.PNG
ActionPanelOther.PNG (4.46 KiB) Viewed 29658 times
ActionPanel.PNG
ActionPanel.PNG (4.26 KiB) Viewed 29658 times
Post Reply