0

My objective is to test the web page to verify that all of the inner text on the web page contains a special character at the beginning. Example: ( "*Refresh") is a label on the page. I am using Visual Studio (2010) UI Automation Testing to create and run this test.

I can create an Assert for every innertext/element on the page, but that will be very time consuming. I wanted to know of another way that is faster and more efficient way to iterate through all of the innertexts on the web page to create this test.

1 Answers1

0

You could load the document in an XML reader (supposing the page conforms to XML standards, which it should), and then look at the nodes programatically.

To use xml classes, see other StackOverflow questions, like:

XDocument or XmlDocument

Community
  • 1
  • 1
McKay
  • 12,334
  • 7
  • 53
  • 76