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

Consider a scenario where there are two action sheets say action 1 and action 2. Can Action 1 take values from action 2 data sheet or vice versa. If so, how?

6 Answers   Oracle, TCS,


What is the difference between "call to action" and "call an existing action"

9 Answers   Accenture, Yana Software,


What are the views available in quicktest professional (qtp)?

0 Answers  


How should i find out whether the cursor is moving horizantally. when tabbing continuously

2 Answers   Livetek,


hi gavasker i want how to merg OR's in QTP 8.2 by QTP Plus

1 Answers  






What is use of Global Sync Timeouts in QTP9.2?

2 Answers  


Is it possible to change the values of analog recording?

0 Answers  


what is difference normal,analog,low level recording in qtp? what is lowlevel recording?

2 Answers   JPMorgan Chase,


how to test Web application using QTP software

4 Answers   BITS,


How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks

0 Answers  


There are some links on the page,count and click those links and check the text on the page displayed on clicking the link.write script for this scenario.

0 Answers  


Hello friends..... On which areas of an application we can not test with QTP

0 Answers   Thatavarti Technologies,


Categories