Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get the input value from .vbs file to QTP Script?
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Uma,

The first thing that u need to do is to associate the .vbs file to QTP by navigationg to File->Settings->Resources. Here attach the .vbs file. Second point is that when u need some value(which is in ur .vbs file) to be used in ur script, u must return the value to the function... Chk the sample code below..

'----- function-----
Code:
Suppose ur function is
Function Open_Link()
  
   fav_env=inputbox("enter ur enviorn...")
    if fav_env=A then
       open link
   elseif ....
      open second link....

   endif
   'Return the value to the function
   Open_Link=fav_env
End Function
'Now to call this function is ur QTP script, u can use the below code

FunctionReturnValue=Open_Link() ' Here FunctionReturnValue will have the value which u have enterd in Input box.

Do let me know if it does not work.

Regards,
Ankesh
Reply


Messages In This Thread
RE: How to get the input value from .vbs file to QTP Script? - by Ankesh - 10-14-2011, 10:24 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need to input Japanese Character through UFT Alaguraja 0 900 07-01-2020, 11:32 AM
Last Post: Alaguraja
  How to get input from the user in QTP? shanthiK 10 18,561 08-07-2017, 11:34 PM
Last Post: zunebuggy
  Sending json file request and validating response in soap UI tool using Groovy script smiley 0 3,880 07-19-2017, 04:58 PM
Last Post: smiley
  Extract and save a file from zip folder using VB Script karthicksri07 1 6,426 06-29-2016, 02:19 PM
Last Post: Ankesh
  qtp script for updating values in xml file automation2012 3 11,499 11-30-2015, 11:07 AM
Last Post: Lavanya N

Forum Jump:


Users browsing this thread: 1 Guest(s)