Search code examples
vbscriptqtphp-uft

Create new method


I'm working with HP UFT. This tool use VBScript to automatics test. Is it possible to create new method in function library. I mean something like this.

Browser("Browser").Page("Page").WebEdit("login").MyMethod()

How can I do that?


Solution

  • Go to the Design menu, and select Function Definition Generator... You'll get the following UI function generator

    Basically this is a helper for RegisterUserFunc.

    By selecting the Register to a test object check-box (and which type of test object) the function you add will be available as a regular test object function.

    Note that you can override an existing function, for example you can change Set to see if the value is "~today~" add today's date.