UnregisterUserFunc Statement
Description
Instructs OpenText Functional Testing to stop using the current registration of the method. If the unregistered method is a defined OpenText Functional Testing method for the object, the functionality of the method returns to the standard OpenText Functional Testing functionality.
Note: If you register a function within a reusable action, it is recommended that you unregister the method at the end of the action.
For more details on unregistering user-defined functions, see the OpenText Functional Testing User Guide.
Syntax
UnRegisterUserFuncTOClass, MethodName
Argument | Type | Description |
---|---|---|
TOClass | String | The test object class for which you want to unregister the method. |
MethodName | String | The method you want to unregister. |

Suppose that the FindFlights Web page contained a Country edit box, and by default, the box contained the value USA
. The following example registers the Set method to use the MySet function in order to report the default value of the edit box to the run results before the new value is entered. After using the registered method in a WebEdit.Set statement for the Country edit box, the UnRegisterUserFunc method is used to return the Set method to the standard OpenText Functional Testing functionality.
Function MySet (obj, x)
dim y
y = obj.GetROProperty("value")
Reporter.ReportEvent micDone, "previous value", y
MySet=obj.Set(x)
End Function
RegisterUserFunc "WebEdit", "Set", "MySet"
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("username").Set "test"
UnRegisterUserFunc "WebEdit", "Set"
See also:
- CallServiceTest Statement
- CreateObject64 Statement
- DescribeResult Statement
- ExecuteFile Statement
- ExitAction Statement
- ExitActionIteration Statement
- ExitComponent Statement
- ExitComponentIteration Statement
- ExitTest Statement
- ExitTestIteration Statement
- GetLastError Statement
- InvokeApplication Statement
- IsPartialRun Statement
- LoadAndRunAction Statement
- LoadFunctionLibrary Statement
- ManualStep Statement
- Print Statement
- RegisterUserFunc Statement
- RunAPITest Statement
- SetLastError Statement
- UnregisterUserFunc Statement
- Wait Statement