How to use library files in QTP? how we can call these
files in to script?
Answers were Sorted based on User's Feedback
Answer / uday kumar_anem
We can load the external Library files by using 2 ways:
1. Choose Test > Settings > Choose Resources tab >
Choose + button so select the library file > browse and
select the library file > click Ok.
2. We can load the library files using Scripting:
Use executefile function to load library files.
Example:
executefile "C:\Documents and
Settings\ukumar\Desktop\Sample.vbs"
x=10
y=5
result=SumOfTwoNumbers(x,y)
msgbox(result)
'Code in External Library file(.vbs file).
'Public function SumOfTwoNumbers(a,b)
'Dim sum
'sum=a+b
'SumOfTwoNumbers=sum
'End Function
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / priyank
add it to resource OR if you required during run-time use
ExecuteFile " ..\absolute path "
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / chandana
Hi priyank
can u plz explain in detail with validations, it is very
use full for us.
Thank U
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / pravati
file>>new test>>test name>>test path >> save
file>>new>>function library>>path>>create file>> write script>>save.
for associate file>>setting>>Resources>>associate function library in the test which u want to call the function library>>apply>>ok
Is This Answer Correct ? | 0 Yes | 0 No |
How to run a script from lines 50 - 100 alone (if the script has 1- 200 lines of code)?
Use of environment variables?
Plz give the vb script for the following scenerio I have faced one issues while doing test in QTP. I have described the scenario below. 1. I have to test web application.In that i want to select from the drop down values in the application. 2. Suppose Drop down has 5 value "A,B,C,D,E".I would like to give value from data table of QTP. 3. For every iliteration it should select A,then B and so on
I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me
Find the 'String' from excel sheet and save to another sheet.But we don't know the string column number and row number?
I want to clear the webedit field without using set"" in qtp script
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
What is text check point and text area check point?
What are the features and benefits of Quick Test Pro(QTP)?
Generic function to search for the unique link in webtable and click on it
what is functions in qtp?i know the userdefind &bulit funation or i know that Private public function ?plz tell me what is funations in qtp?how to create a funation in qtp
What are private functions in QTP? How they can be called from the function library?