Collections:
Load UFT Environment Variable File
How to Load UFT Environment Variable Files?
✍: FYIcenter.com
There are two ways to load Environment Variable Files in UFT:
1. Load an Environment Variable File from the test settings.
Go to "Files > Settings > Environment > User-Defined".
Check "Load variable and values from external file" option, and click the browse button locate and load the Environment Variable File.
2. Load an Environment Variable File with the Environment.LoadFromFile(file_name) method in the test script code.
Here are some example codes that loads an Environment Variable File:
environment.LoadFromFile("C:\\fyicenter\\UFT\\env.xml")
' Loads an Environment Variable File with absolute file path.
environment.LoadFromFile(".\\env.xml")
' Loads an Environment Variable File with relative file path.
Loading Environment Variable Files with relative file path in test script code is the best option. It makes your test more explicit and easy to be moved around.
⇒ Create Function Library in UFT
2018-01-24, 7275🔥, 0💬
Popular Posts:
How to valid IP addresses? In order to help your programming or testing tasks, FYIcenter.com has des...
How to validate Mod 10 (Luhn Algorithm) checksum? In order to help your programming or testing tasks...
How to update hidden input value field value with WebDriver in Python? Normally, a hidden input valu...
How to set Content-Type to application/json? The server requires the Content-Type to be application/...
Where to find online test tools? FYIcenter.com has prepared a number of online test tools: Data Look...