SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 17
  1. #1
    Junior Member
    Join Date
    Feb 2004
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    XML within WinRunner

    Has anybody attempted to create a dll that provides access to some of the MSXML from functionality within WinRunner ?

    I need to create WinRunner scripts that use data held within an XML file rather than in an Excel SpreadSheet. We are not in a position to migrate to QuickTest at present so I need a solution within WinRunner.

    One solution I have found on the web suggests invoking the Windows Scripting Host - but as I will be retrieving a lot of data throughout a test run I'd prefer not to sporn a batch script for each data access.

  2. #2
    Junior Member
    Join Date
    Jan 2003
    Location
    France
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    Maybe a COM object (like WShell) can handle XML.

    Just install COM support for WR (downloadable on Mercury site) and try to access its methods and porperties

  3. #3
    Senior Member
    Join Date
    Feb 2002
    Posts
    524
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    Try posting your question in the WinRunner forum. You'll likely get more info that way.

  4. #4
    Junior Member
    Join Date
    Feb 2004
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    YASKO you are a star.

    many thanks !! I have downloaded the COM support and the latest version of MSXML4.0.

    the following script works a treat and is a solution we will be building upon.

    PedroG ... you also made a very worthy point [img]images/icons/smile.gif[/img]


    public xmlObj, fileName, res, elementPath, theElement;

    # load the MSXML com object and retrieve a handle to it
    load_com("Msxml2.DOMDocument.4.0", xmlObj);

    # xml sources
    xmlStr = "<customer>20<first_name>Joe</first_name><last_name>Smith</last_name></customer>";
    fileName = "c:\\temp\\test.xml";

    # Load the xml document from a string
    com_activate_method(xmlObj, "loadXML",res, xmlStr);

    # OR
    # Load the xml document from a file
    # com_activate_method(xmlObj, "loadXML",res, fileName);

    com_set_property(xmlObj,"SelectionLanguage","XPath ");
    elementPath = "//customer//last_name";
    com_activate_method(xmlObj, "selectSingleNode", element, elementPath);
    com_get_property(element, "text", value);
    report_msg(value);

  5. #5
    Junior Member
    Join Date
    Apr 2003
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    Where exactly on the Mercury website can you download the com support for WinRunner?

    Thanks!~

  6. #6
    Junior Member
    Join Date
    Feb 2004
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    http://svkbweb02.merc-int.com/top5/k...850;Product=WR

    or search the mercury knowledge base (not the user contributed one) for item # 4850

    the script I attached in the last message does not work for loading xml in from a file as yet ... [img]images/icons/frown.gif[/img]

    i get a debug message error : -214702809 whenever I try ... which I'm still investigating.

    If you do happen to use the COM ddl with MSXML and manage to load XML from a file could you post your solution back on here .... thanks Dawn.

  7. #7
    Junior Member
    Join Date
    Apr 2003
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    Thanks Dawn for the information.

    I'll try to work COM dll and MSXML during this week and hopefully get back to you soon.

  8. #8
    Junior Member
    Join Date
    Apr 2003
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    How about trying MSXML 3.0? I will try both and get back to you.

  9. #9
    Junior Member
    Join Date
    Feb 2004
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    I have logged a call with Mercury too. ... A chap has responded already to say he's investigating the problem. I'll post any update when they get back to me.

  10. #10
    Junior Member
    Join Date
    Apr 2003
    Posts
    15
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: XML within WinRunner

    Haven't had time to mess with XML in WR, but I found this in Mercury's User Input Functions.

    I cannot figure out how to extract the URL without the SessionID, so here is the navigation to the XML Add-In

    1.) Go to Mercury's website : http://support.merc-int.com/cgi-bin/.../CSO/index.jsp
    2.) On the left column, click Downloads
    3.) Click the radiobutton labeled, "User Contributed downloads", Select WinRunner in the drop down box and click Retrieve.
    4.) The Description is called "XML Parser Add-In"

    Please report back with results if you've tried to use this. I'll do the same (when I have time testing it)

    Thanks!

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 08:05 PM.

Copyright BetaSoft Inc.