Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Equivalent functions for WR functions.
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
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,
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.
Reply


Messages In This Thread
RE: QTP Equivalent functions for WR functions. - by basanth27 - 08-26-2009, 06:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error on Passing Object between functions SaranKumarV 2 3,446 02-16-2011, 10:36 AM
Last Post: SaranKumarV
  Executing Exe converted functions in QTP 9 scat 1 2,921 04-25-2008, 01:51 PM
Last Post: vaibhav_gandhi

Forum Jump:


Users browsing this thread: 1 Guest(s)