Watir question regarding exist on a class for testing purposes.
Posted
by AJ
on Stack Overflow
See other posts from Stack Overflow
or by AJ
Published on 2010-04-15T20:02:03Z
Indexed on
2010/04/15
20:03 UTC
Read the original article
Hit count: 299
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
© Stack Overflow or respective owner