Here is an example I refer to in this question. On my website I have the feature to sort by name, id and date. It appears as such: SORT BY: Name | ID | Date
Say if sorting by name is the default, and when it IS selected, it IS NOT a link and the span class properties read as follows:{span class="selected"}name{/span}. (I have used "{" and "}" to substitute the greater than, less than keys)
How can can I verify that name is "selected" in the span class. Not just that the text exists because it could be a link when it IS NOT selected.
In other words I want to make sure that 1) The text "name" is there 2) It is NOT a link through making sure the span class is "selected"
I need to know how I can go about doing this in both Jiffe and Selenium.
Thanks for your help!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Here is an example I refer to in this question. On my website I have the feature to sort by name, id and date. It appears as such: SORT BY: Name | ID | Date
Say if sorting by name is the default, and when it IS selected, it IS NOT a link and the span class properties read as follows:{span class="selected"}name{/span}. (I have used "{" and "}" to substitute the greater than, less than keys)
How can can I verify that name is "selected" in the span class. Not just that the text exists because it could be a link when it IS NOT selected.
In other words I want to make sure that 1) The text "name" is there 2) It is NOT a link through making sure the span class is "selected"
I need to know how I can go about doing this in both Jiffe and Selenium.
Thanks for your help!
this sounds like a good case for using XPath.
Check out the tags that support xpath in both the Selenium-RC and Jiffie plug-ins.
Something like:
//SPAN[@class='selected' and text()='name']
should do nicely