How to chose "yes"/"No" button with dynamic id

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to chose "yes"/"No" button with dynamic id

ye.tao
This post has NOT been accepted by the mailing list yet.
Hi,
I am new to use Selenium IDE. I need to chose "Yes"/"No" button with dynamic xpath id.
How do I chose the "Yes" button? Thanks!

Here is the button html code
<button id="button-1114-btnEl" class="x-btn-center" autocomplete="off" role="button" hidefocus="true" type="button" style="width: 69px; height: 16px;">
Yes

</button>
Reply | Threaded
Open this post in threaded view
|

Re: How to chose "yes"/"No" button with dynamic id

"

If there is more than one button but it alway appears in the same order, you can always refer to the button by its index instead of a name (index=#representing appearance in code)
bclevy
This post has NOT been accepted by the mailing list yet.
Is this the only button on the page?  And does it always start with the word "button"?  If so than you can search by xpath using regular expressions like "
click//button[starts-with(@id, ’button’)]