| || |
How to check for breadcrumbs and TOC in a webpage
hi, my script requires me to check for breadcrumbs and TOC in the web page i am testing.
But i dont know how to distinguish them from normal links
cos as far as my knowledge i can at the max put a page checkpoint which can check for links and images in the page
my web page currently does not have breadcrumbs on it, but in future if it shows them up, i want to be able to identify them.
For the time being what i am doing is keeping track of no of links available on the page, if breadcrumbs occur in future i believe it would show up as increase in number of links.
Is my understanding correct, or is there any other more sophisticated way of tackling this problem?
any help appreciated
Re: How to check for breadcrumbs and TOC in a webpage
The fact that your developers are planning to add 'breadcrumbs' to your AUT, it is probably the right time to convince them to assign those links a unique class like "class=breadcrumbs". By this you can easily find all the links on your current page with class=breadcrumbs and identify them. This will be a good web (development) standard to follow and will be very much helpful to your automation process. You may want to read an article on Developing automation friendly websites on Tarun's site.
If that's not an option, then as you said, you would most probably will have to write your script based on the logic of keeping track of the links you visited.