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

Difference between object identification and smart identification

2 Answers   Wipro,


Among the 4 capture levels, Complete, Partial, Minimal, None. which one is mostly used?

1 Answers  


I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next

0 Answers  


Can anybody send me the code to get the RO property of the active screen in QTP while running?

9 Answers  


how we can do web browser using parametarisation in QTP ?

2 Answers   Efextra, Kanbay,






what is key word driven frame work how to use keyword driven frame in QTP in a project

1 Answers   AppLabs,


Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?

1 Answers  


Can we do qtp testing without creating objects in Dbject repository? can we do it completely writing code i.e in expert view only. Are there any books for this?

7 Answers   Accenture,


What r the different filters in defect in quality center

0 Answers  


anyone can explain Diff B/w Actions and Functions

2 Answers  


A question was asked in a company-suppose, I am testing a website on QTP, all the time a new title bar is appeared on next page. Trying to use regular expression under key word driven testing but expert view is also appearing unchanged and error is also generating, do you have any best resolution for that kindly explain in detail. please dont give example of yahoomail, that is unable to clear my doubt.

2 Answers  


Hi I am from delhi, Now I can surely say that no institution of QTP here in Delhi After reading you people I want to get cry, from last six month I am trying to learn QTP, I have knowledge too but dont know VB Script. Now it appears that without learning QTP no one can learn complete QTP, I want to get a formal learning in QTP. Can you suggest me the best institution. and please let me know the charges and span of the course too. thanks in advance to you alkaa.dugaal@gmail.com

1 Answers  


Categories