How would I get to the HTML source page?

4 posts, 0 answers
  1. Thanh
    Thanh avatar
    3 posts
    Member since:
    Apr 2012

    Posted 15 May 2012 Link to this post

    I have an calendar web app that gives the user an RSS page / XML page of today's events. I want to verify that data, but I'm not sure how to get the XML page as as element to read the data.

    Here is an example of the XML page:
    <?xml version="1.0" encoding="iso-8859-1"?><event><item><title>PROD-1464</title><date>Thursday, April 26, 2012</date><time /><enddate>Saturday, May 26, 2012</enddate><description /><location>Centerville Room 5</location><library>Centerville Library</library><link></link></item><item><title>Ongoing Event</title><date>Wednesday, May 09, 2012</date><time /><enddate>Thursday, May 31, 2012</enddate><description /><location>Centerville Room 5</location><library>Centerville Library</library><link></link></item><item><title>Automation Weekly Recurring Event</title><date>Tuesday, May 15, 2012</date><time>1:00 PM</time><enddate /><description /><location>Centerville Room 4</location><library>Centerville Library</library><link></link></item></event>




  2. Byron
    Admin
    Byron avatar
    184 posts

    Posted 15 May 2012 Link to this post

    Hello Thanh,

    Thanks for trying Test Studio. Because your XML document will not contain a DOM, there is no way for Test Studio to locate and verify elements within it. You can create a coded step to fetch the document and perform whatever actions you wish with its contents -- but you would have to write the code to do so.

    Kind regards,
    Byron
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. Thanh
    Thanh avatar
    3 posts
    Member since:
    Apr 2012

    Posted 16 May 2012 Link to this post

    Hello Byron,

    Thank you responding so quickly. Is there a variable I can call to fetch the document source to read the data?

    Thank you,
    Thanh
  4. Byron
    Admin
    Byron avatar
    184 posts

    Posted 16 May 2012 Link to this post

    Hello Thanh,

    The XML document on your site will not itself be stored in a variable. However, you can access the source of the HTML displayed in the current browser using the ActiveBrowser.ViewSourceString variable. If you wish to store the contents of the XML document in a variable, you will need to accomplish this in code.

    Greetings,
    Byron
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top