I wish to find this element based on PAGE NAME because all of the id attributes are dynamic and generated at page load time so I can not reference them because I don't know the value ahead of time.
In selenium you can click on a link using "click link=link text" however this does not work for a button or span...
Re: Need help in locating an element by it's text within a span...
Brian Kirby wrote:
> I need to identify and then click on a page tab (implemented as a
> button) which contains a span with the page name text in the span.
> <p> <td nowrap="nowrap" id="page_443_c"
> class="SecondaryTabButtonCenter" align="center"> <button
> type="button" style="background-color: transparent;border-style:
> none;"> <span id="page_443_label">PAGE NAME</span> </button> </td>
You'll probably need to resort to XPath. Try "//span[text()='PAGE NAME']"