Exforsys
+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

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 ...

  1. #11
    ajojiraj is offline Junior Member Array
    Join Date
    Jan 2009
    Answers
    11
    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>


  2. #12
    basanth27 is offline Junior Member Array
    Join Date
    Jul 2009
    Answers
    12
    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 ??


  3. #13
    ajojiraj is offline Junior Member Array
    Join Date
    Jan 2009
    Answers
    11
    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.


  4. #14
    basanth27 is offline Junior Member Array
    Join Date
    Jul 2009
    Answers
    12
    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...


  5. #15
    basanth27 is offline Junior Member Array
    Join Date
    Jul 2009
    Answers
    12
    Adding another info...

    Are you behind a firewall ?? If so, can you disable it and then check again,.


  6. #16
    ajojiraj is offline Junior Member Array
    Join Date
    Jan 2009
    Answers
    11
    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.


  7. #17
    basanth27 is offline Junior Member Array
    Join Date
    Jul 2009
    Answers
    12
    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.


  8. #18
    ajojiraj is offline Junior Member Array
    Join Date
    Jan 2009
    Answers
    11
    I'll try te options or looks for some other solution but Thanks Basanth. Really appreciate the support u gave.
    Thanks a ton !


  9. #19
    moonlight is offline Banned Array
    Join Date
    Jul 2008
    Answers
    27
    There are methods available for XMLUtil object to update xml file.


  10. #20
    ajojiraj is offline Junior Member Array
    Join Date
    Jan 2009
    Answers
    11
    Can you pls give some example?


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...