There are Some Scripting Techniques should be followed in Test Partner.
Try to use set function in vb script so that it will reduce some time during writing scripts.
Syntax for Set function in Vb Scripting is
Set Variable=New Object Expression
Object Expression:Required. Expression consisting of the name of an object, another declared variable of the same object type, or a function or method that returns an object of the same object type.
So Suppose we use more often during scripting in TestPartner always using Window and HTMLBrowser for attachement.So inorder to reduce this we can follow this model.
Ex: I have an "Window("Application=NOTEPAD.EXE Caption='Untitled - Notepad'").attach
So inorder to write entire script in anywhere in the script for window i can directly assign some variable and use it in testpartner by following this below example
Dim win As TWindow
Set win=Window("Application=NOTEPAD.EXE Caption='Untitled -Notepad'").attach
so iam setting it as win variable anywhere i can use as win and directly give attach.
win.attach
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment