Desktop web testing code sample
The following example starts OpenText Functional Testing, opens a new test, and configures it for recording and running on a Web application.
It includes the following steps:
- SetLab - LocalBrowser
- Env - Return: DigitalLab|MobileCenter|LocalBrowser
- Parameterization - BrowserParameterName|Parameterization(DataTable|TestParameter)
This example assumes that OpenText Functional Testing is not open.
Dim qtApp 'As QuickTest.Application ' Declare the application object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the application object
'1
qtApp.Test.Settings.Launchers("Web").SetLab "LocalBrowser"
'2
qtApp.Test.Settings.Launchers("Web").Env
'3
qtApp.Test.Settings.Launchers("Web").Browser = "IE"
msgbox qtApp.Test.Settings.Launchers("Web").Browser
'4
qtApp.Test.Settings.Launchers("Web").BrowserParameterName = "aaa"
msgbox qtApp.Test.Settings.Launchers("Web").BrowserParameterName
qtApp.Test.Settings.Launchers("Web").ParameterizationType = "DataTable"
msgbox qtApp.Test.Settings.Launchers("Web").ParameterizationType
qtApp.Test.Settings.Launchers("Web").ParameterizationType = "TestParameter"
msgbox qtApp.Test.Settings.Launchers("Web").ParameterizationType
qtApp.Visible = True ' Make the OpenText Functional Testing application visible
Set qtApp = Nothing ' Release the Application object
See also: