Collections:
What Are Environment Variables in UFT
What Are Environment Variables in UFT?
✍: FYIcenter.com
Environment variables in UFT are information about the execution environment
of the test script. Environment variables are accessible using the built-in
object method: Environment.Value(variable_name).
Environment variables are divided into 3 categories:
1. Built-In Environment Variables - Built-In Environment Variables are defined by UFT to provide you information about the operating system where the UFT is running and the current test script context.
Examples of Built-In Environment Variables:
Environment.Value("OSVersion")
' Returns the operating system version where the UFT is running.
Environment.Value("TestName")
' Returns the name of the current UFT test you are running.
2. User-Defined Environment Variables - User-Defined Environment Variables are defined by you through the test configuration, environment variable files, or VBscript codes. User-Defined Environment Variables are usually used as parameters to control your test.
Examples of User-Defined Environment Variables:
Environment.Value("URL") = "http://sqa.fyicenter.com"
' Sets up a User-Defined Environment Variable at the beginning of the script.
...
SystemUtil.Run "chrome.exe", Environment.Value("URL")
' Uses the User-Defined Environment Variable later in the script.
2018-05-08, ∼4588🔥, 0💬
Popular Posts:
Where to find tutorials on UFT (Unified Functional Testing) tool? I want to know how to use UFT. Her...
How to convert IPv4 to IPv6 addresses? In order to help your programming or testing tasks, FYIcenter...
How to convert a date and time to a standard format? Date and time can be displayed in a number of s...
Where to find test data generators? FYIcenter.com has prepared a number of test data generators for ...
Why I am getting gzip compressed HTTP response in SoapUI? If you run a HTTP request for some Website...