How to call .vbs functions in QTP? plz Explain indetail

Answers were Sorted based on User's Feedback



How to call .vbs functions in QTP? plz Explain indetail..

Answer / kavs

to call function in QTP go to
test--->settings-->resorces-->add the .vbs file

correct me if am wrong.

Is This Answer Correct ?    4 Yes 0 No

How to call .vbs functions in QTP? plz Explain indetail..

Answer / bfakruddin

Above two answers are correct but they forgot to explain
about the differences of those?

1. Call .vbs file

Test Settings-->Resources-->+ button-->show the path of .vbs
file-->Click OK button

Click the "Check Syntax button"

It is available for all actions in the test. If you click
"Set as Default" It will be available for all the new Tests.

In Test Pane.

Call functionname(parameters)
or
var=functionname(parameters)
msgbox var

2. Executefile "path of .vbs" file

It is used to execute the function dynamically but it is
used for only particular action,

Is This Answer Correct ?    2 Yes 0 No

How to call .vbs functions in QTP? plz Explain indetail..

Answer / nandishpatil

You can execute a VB Script function using the statement

ExecuteFile "File"

Eg: If you have the .vbs (MyVBScript.vbs) file in the
path "C:\Temp" then the following statement will call the
same:

ExecuteFile "C:\Temp\MyVBScript.vbs"

Is This Answer Correct ?    1 Yes 0 No

How to call .vbs functions in QTP? plz Explain indetail..

Answer / anonymous

You can Load the function into the test dynamically using the statement

LoadFunctionLibrary "Path of File"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

how to merge object repositories in qtp for n different applications

1 Answers  


1. how can you handle exceptions without using recovery scenario?

5 Answers   TCS,


How to add verification steps to tests?

1 Answers  


Tell me the situations where we will use Data Driven?

4 Answers   Ordain Solutions,


What is the Diff between Image check-point and Bit map Check point?

15 Answers   CTS,


in a web table , i want you to click a particular object inside cell

2 Answers  


how do u get lib files into scripting files?

4 Answers  


how to do regression testing in qtp? plz give ans with examples

6 Answers   TCS,


How software tester can use constants and variables in scripts?

0 Answers  


write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))

0 Answers  


How you calling actions in qtp?

0 Answers  


Pls anyone, tell me the script in QTP to find the number of links, and images in a webpage. Verry very urgent. I shall really be very thankful

3 Answers  


Categories