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|
A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.
The structure of keyword driven frame work is like a folder structure the different sub folder are 1-functional libray folder 2-object repository folder 3- database folder 4-appliction1.xls 5-initalzation vbs file 6-sequence file 7-driver script 8-test case list file My question is whether these are in a local server machine or in our pc.((whether It like Vss). can u give example of driver script(code)
what is mercury.clipboard in qtp.where we can get this in qtp tool i.e tabs
Hi, How to export the Checkpoints and Output values(Test area output values) from Object Repository to Excel
can we run the scripts of qtp 8.2 in the qtp7.0?
what is the difference between QTP 8.0 & 9.0?
While writing script using For Next Statement in QTP, I try defining the variable in Lib File I am getting syntax error whereas if I use the variable in script file, the script works fine. Can anyone help me in finding the reason behind this?. E:g Dim intStartRow (Define in Lib File----- say abc.vbs) Dim intRow (If I define this variable in Lib file I am getting Syntax error where as if I define in the script file ---- say xyz.mts the script works fine) IntStartRow=2 For intRow = intStartRow to xlWrksht.UsedRange.Rows.Count ‘Some Code here Next
Can anybody give the code for ALL DATATABLE METHODS)(ex: datatable.getrowcount, datatable.getsheet etc....) and ALL DATABASE COMMANDS (like .getcelldata, which are used to retrieve data from a database and from a webtable)with examples.
what we do after completion of functional and regression testing
I am using Shared OR, and my collegues are also using Shared OR. How to merge Object Repositories?
What is difference between QTP 8.2 Obect Repository and QTP 9.2 object Repository?
The interviewer asked me when u recorded one application.object repository properties are saved with .tsr extention. in qtp expert view wherever mouse is there that snapshot displayed in active screen but some recored script lines are not displyed in actives screen y?