Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with XML CheckPoint in QTP

Status
Not open for further replies.

Rad999

Technical User
Nov 15, 2006
22
0
0
CA
Functionality is to pick up the current XML file and Load and check the data using XML checkpoint.
When I run my script I am getting an Error message saying that. PROBLEM LOADING XML FILE.
Can anyone please help me.It is veryyyyy urgent.

 
Is the XML well-formed?? To know whether it is well-formed or not open it using Internet Explorer. If u can see the contents of XML file in the browser then itz a well formed XML. If itz not then ask some developer in your who knows XML to make it well-formed. If all else fails, check the path.
 
I checked it is a well formed file.It is working fine.Ours is a financial Market producy for Trade exchange.It is running for one exchange but I have to run the same script for three Exchanges.How do i make my script intelligent to run for all the three instances at once.Below is the script:
FilePath= DataTable("ETMXMLFilePath", dtLocalSheet)

Dim fso: Set fso=createObject("Scripting.fileSystemObject")
Dim CurrentFolder: Set CurrentFolder = fso.GetFolder(FilePath)
Dim Nameoffile, MM,YY,DD, MyTime, AddressOfString,XMLFileDate,XMLFileName1,FileNameWithPath
Dim MyArray
Mytime = Now
MM = Month(Mytime)
YY = Year(Mytime)
DD = Day(Mytime)

FileName = "XNYS_"+CStr(YY) +"-"+CStr(MM)+"-"+CStr(DD)

XMLFileDate=CStr(YY) +"-"+CStr(MM)+"-"+CStr(DD)
DataTable.GetSheet("CheckETM-XMLFile").GetParameter("XMLFileDate").Value=XMLFileDate

Dim Files: Set Files = CurrentFolder.Files
Dim File

For Each File In Files


if CStr(MID(File.Name, 1,15)) = CSTR(FileName) Then
XMLFileName1 = File.Name

End If
Next

msgbox XMLFileName1

FileNameWithPath=FilePath+"\"+XMLFileName1
DataTable.GetSheet("CheckETM-XMLFile").GetParameter("XMLFileName").Value= FileNameWithPath
XMLFile("XTSE_2006-11-14T16_17_57").Check CheckPoint("XTSE_2006-11-14T16_17_57")

XNYS is the name of the exchange.The other two exchanges are XTSE and FORX.
The script is good for anyone of the three exchanges.But I have to run all the three exchanges in one script.Can anyone please help.I am pretty new to QTP and Scripting.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top