This is a migrated thread and some comments may be shown as answers.

How would I get to the HTML source page?

3 Answers 21 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Thanh
Top achievements
Rank 1
Thanh asked on 15 May 2012, 05:28 PM
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>




3 Answers, 1 is accepted

Sort by
0
Byron
Telerik team
answered on 15 May 2012, 10:43 PM
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
0
Thanh
Top achievements
Rank 1
answered on 16 May 2012, 02:06 PM
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
0
Byron
Telerik team
answered on 16 May 2012, 05:20 PM
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
Tags
General Discussions
Asked by
Thanh
Top achievements
Rank 1
Answers by
Byron
Telerik team
Thanh
Top achievements
Rank 1
Share this question
or