How to call .vbs functions in QTP? plz Explain indetail
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
Difference between object identification and smart identification
Among the 4 capture levels, Complete, Partial, Minimal, None. which one is mostly used?
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
Can anybody send me the code to get the RO property of the active screen in QTP while running?
how we can do web browser using parametarisation in QTP ?
what is key word driven frame work how to use keyword driven frame in QTP in a project
Plz explain about MATCH/EXACT MATCH/IGNORE SPAGE in text check points?
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?
What r the different filters in defect in quality center
anyone can explain Diff B/w Actions and Functions
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.
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