How to retrive XML file data in QTP ? using Script(Chandana)
Answers were Sorted based on User's Feedback
Answer / kr
In QTP9.0 it supports XML input data.here also same as in
QTP8.2 we can import .xml files into user defined
Environment Variable section.
|Is This Answer Correct ?||10 Yes||0 No|
Answer / sandipgami84
u can retrive data from database(XML fromet)..
u can use SQL..
LIKE e.g. Select * FROM TableName For XML Type, AUTO
Cell No: 09986645937
|Is This Answer Correct ?||6 Yes||0 No|
Answer / fayaz
We can load environment variables from an xml file.
File --> Settings and click the "Environment" tab
You can see a check box "Load environment variables "
check it and give the path of the xml file.
when u run QTP , the variables in XML file will be
And you can retrieve those values using Environment.value
("variable_name") from any actions.
Hope this will answer your question
|Is This Answer Correct ?||7 Yes||4 No|
Answer / nidhi jain
Chandan, below is solution
Const XMLDataFile = <your file path>
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.Async = False
Set nodes = xmlDoc.SelectNodes(<provide you node hierarchy>)
MsgBox "Total books: " & nodes.Length
Set nodes = xmlDoc.SelectNodes("<node hierarchy>/text()")
' get their values
For i = 0 To (nodes.Length - 1)
Title = nodes(i).NodeValue
MsgBox "Title #" & (i + 1) & ": " & Title
I hope this will be helpful.
|Is This Answer Correct ?||8 Yes||5 No|
Answer / reddy
shilpa u can not understanding what is the requirement of
what she asking is how to retrieve xml file data using
script in qtp
ex: u have data in datatable that all the will be retrive
in xml format using script
|Is This Answer Correct ?||3 Yes||1 No|
Answer / shilpa reddy
chandana,we cannot apply xml data directly to script,first
we should import data into runtime datatable using import
sheet/import methods.using datatable methods we can apply
this values in our required location in the script.I
provided script for this in further answers,check it out
|Is This Answer Correct ?||3 Yes||9 No|
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
Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln
If 3 browsers are opened in our system, how to enter the facebook url into second browser by using descriptive programing
suppose our project is developed using java technologies.after complition of the coding developer relesed a build to the testing team.so, what is the process means how we open that documents?what are that documents?plz give reply its urgent
If there r 1000 test scripts that were written. If a change to any functionality is to be made then how can we know in which script is this functionality existing.
In QTP while testing 3 tier application, It is Java Based Application developed using Java, servelets and JDBC etc... and It is a Web based Application.. which Add-In do we need to select while testing ...Java or Web Add-In
How do you create a library file
wt is automation framework? give explonation?
tell me about framework types and most used framework in real time. types of output value in details. diff between wr and qtp in detail.
How to export QTP results to an ".xls" file?
what is Unicoad Compatibility ???? HOw does this makes a diffrence from Winrunner.???
How to integrate the qualitycenter with qtp