Here is the Watir code I'm using:
require 'watir-classic' browser = Watir::IE.new browser.link(:class, "Wizardbutton").exists?
Here is the part of the HTML page containing the link I'm trying to check if exists.
<tr> <td align="left" style="vertical-align: top;"> <a class="Wizardbutton"href="javascript:parent.showPopup('/web/wizard.html');window.focus();"> <span>Add new Team</span> </a> </td> </tr>
The error I am getting is:
Watir::Exception::UnknownObjectException: Unable to locate element, using {:tag_name=>["a"], :class=>"Wizardbutton"}
Why am I getting the error that the link element does not exist when I can clearly see it in the HTML source? I have successfully clicked on other links on the page, but for some reason I do not see this. Is the built-in span tag losing something? I also tried to choose to use href, and that didn't work either. Any understanding would be greatly appreciated!
source share