Watir question regarding exist on a class for testing purposes.
- by AJ
I have a button on my page that changes depending on what radio button is clicked. The button has the same text on it with the same id, but different classes. How do I test if the two different buttons exist depending on the radio.
<a id="submit" class="on" href="javascript:submit();">Submit</a>
<a id="submit" class="off" href="javascript:submit();">Submit</a>
How do i test if the second button appears instead of the first one. I used something like, browser.link(:text, 'Submit').exist?
but this doesn't work cause it will return true no matter what.
thanks