08-26-2009, 06:20 PM
Answers to whatever i can help you with,
3. match - finds the occurrence of a regular expression in a string. This function returns the location in the string at which the regular_expression is found. The value returned is the character position at which the regular expression starts. Instr is the function you must be looking for. Research about Instr on any vbscript help and you will know about it.
4. treturn - The treturn statement is used when calling a test. It stops a called test and returns control to the calling test. It also provides a return value for the called test. Could be compared with Actions. You can call actions as a copy of action or existing action. The values are sent or retrieved through Input & Output Parameters.
5. getenv - returns the value of any environment variable, as defined WinRunner runtime environment.
getenv function reads the current value of an environment variable. I am not a expert on Winrunner. But from what you say i guess you are reffering to Environment.Value("env_var_name"). The usage is dynamic as well static. Try this on QTP and you will know what i mean,
There are 2 types of Environment Variables. Inbuilt and UserDefined. The above code will fetch data from a Inbuilt Environment variable.
Please do spend sometime with the QTP help trying to understand the above explanation.
if you have questions please post back.
3. match - finds the occurrence of a regular expression in a string. This function returns the location in the string at which the regular_expression is found. The value returned is the character position at which the regular expression starts. Instr is the function you must be looking for. Research about Instr on any vbscript help and you will know about it.
4. treturn - The treturn statement is used when calling a test. It stops a called test and returns control to the calling test. It also provides a return value for the called test. Could be compared with Actions. You can call actions as a copy of action or existing action. The values are sent or retrieved through Input & Output Parameters.
5. getenv - returns the value of any environment variable, as defined WinRunner runtime environment.
getenv function reads the current value of an environment variable. I am not a expert on Winrunner. But from what you say i guess you are reffering to Environment.Value("env_var_name"). The usage is dynamic as well static. Try this on QTP and you will know what i mean,
Code:
oTestName = Environment.Value("TestName")
msgbox oTestName ' Will tell you the current test name.
There are 2 types of Environment Variables. Inbuilt and UserDefined. The above code will fetch data from a Inbuilt Environment variable.
Please do spend sometime with the QTP help trying to understand the above explanation.
if you have questions please post back.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.