Exforsys

Free Training

How to modify an xml file using QTP?

This is a discussion on How to modify an xml file using QTP? within the Software Testing forums, part of the Testing category; Basanth, the above code doesn't print anything. but if i select a file which has only the below content, QTP ...

Go Back   Exforsys > Testing > Software Testing

Exforsys.com


Software Testing Software testing is a process used to identify the correctness, completeness and quality of developed computer software.

Reply

 

LinkBack Thread Tools Search this Thread
  #11 (permalink)  
Old 07-06-2009, 07:37 AM
Junior Member
 
Join Date: Jan 2009
Posts: 12
ajojiraj is on a distinguished road
Basanth, the above code doesn't print anything.
but if i select a file which has only the below content, QTP displays a log file during runtime & displays the below code in the log file.

<Values>
<ShippingAmount>
</ShippingAmount>
</Values>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 07-06-2009, 07:42 AM
Junior Member
 
Join Date: Jul 2009
Posts: 12
basanth27 is on a distinguished road
Set xmlobj = XMLUtil.CreateXMLFromFile("D:\InvoiceLoad\Regression Testing\LeaseInvGap8OPDE_COA.xml")

rootelements = xmlobj.GetRootElement

msgbox rootelements

Try this. Is your D: drive on the local machine or it is a remote share ??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 07-06-2009, 07:49 AM
Junior Member
 
Join Date: Jan 2009
Posts: 12
ajojiraj is on a distinguished road
It again displays the same warning - "The underlying connection was closed: Unable to connect to the remote server."

D: drive is in my local machine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 07-06-2009, 07:57 AM
Junior Member
 
Join Date: Jul 2009
Posts: 12
basanth27 is on a distinguished road
Could you close QTP & then open it back up.Try running it then.

If it doesnt work, Just copy the xml file and place it under C: drive. Then provide the path C:\xml file and then execute the code.

Lets see...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 07-06-2009, 08:01 AM
Junior Member
 
Join Date: Jul 2009
Posts: 12
basanth27 is on a distinguished road
Adding another info...

Are you behind a firewall ?? If so, can you disable it and then check again,.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 07-06-2009, 08:12 AM
Junior Member
 
Join Date: Jan 2009
Posts: 12
ajojiraj is on a distinguished road
I restarted QTP and also executed the script by placing the file in C: drive but displays the below msg as before.

Quote:
Originally Posted by ajojiraj View Post
It again displays the same warning - "The underlying connection was closed: Unable to connect to the remote server."

I'm not sure if therz a firewall in my machine and as i'm working from my off machine, i dont have access to view or to change the settings.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 07-06-2009, 08:49 AM
Junior Member
 
Join Date: Jul 2009
Posts: 12
basanth27 is on a distinguished road
Intresting !!

I am unsure as to why you are getting that error...but this definitely looks to me like there is some issue with the response server. I may be wrong here, so the last i can help you is with the article below.

http://support.microsoft.com/default.aspx?scid=kb;EN-US;915599

You receive one or more error messages when you try to make an HTTP request in an application that is built on the .NET Framework 1.1 Service Pack 1

Sorry pal, i tried my best...i am out of solutions.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 07-07-2009, 01:45 AM
Junior Member
 
Join Date: Jan 2009
Posts: 12
ajojiraj is on a distinguished road
I'll try te options or looks for some other solution but Thanks Basanth. Really appreciate the support u gave.
Thanks a ton !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 07-15-2009, 05:53 AM
Junior Member
 
Join Date: Jul 2008
Posts: 18
moonlight is on a distinguished road
There are methods available for XMLUtil object to update xml file.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 07-15-2009, 11:04 AM
Junior Member
 
Join Date: Jan 2009
Posts: 12
ajojiraj is on a distinguished road
Can you pls give some example?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
testing of .net aplication naga_sri Testing Tutorials 1 02-16-2007 03:27 AM
Tutorial on Silk Test spriya279 Testing Tutorials 2 02-15-2007 07:31 PM
Apple II Csa2 FAQs: Uploading & Downloading, Part 21/25 rubywand@swbell.net Tech FAQ 0 05-04-2004 10:01 AM
Apple II Csa2 FAQs: Error List, Part 8/25 rubywand@swbell.net Tech FAQ 0 05-04-2004 10:01 AM
Solaris x86 FAQ 2/2 Dan Anderson Tech FAQ 0 04-27-2004 08:24 PM


All times are GMT -4. The time now is 05:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0
Copyright 2004 - 2009 Exforsys Inc. All rights reserved.