Is there is any way to test the order of elements on a web page. I mean, if the developer changes the order of elements
on a webpage and runs the previous created test script, it should fail. Is that possible?
1 Answer, 1 is accepted
0
Cody
Telerik team
answered on 04 Sep 2009, 04:46 PM
Hello Sandeep Endapally,
Yes there are a couple of methods you can use to verify the order of elements. The quick method would be to select the element and craft a verification step that would verify the InnerMarkup or the InnerText equals a specific value. For example, if you have a UL element that contains a number of LI elements, you would locate the UL element in DOM explorer, right click on it and select Record Options, select Verification, then constuct a verification of the InnerText or the InnerMarkup is exact to some value.
The other method is to add a code behind method that does something like this:
If you still need assistance, I need more details of what/where exactly you'd like to verify the order of something, along with sample HTML code to study. Then I can give you better assistance for your speciric test case.