Skip to main content
2 of 5
entire text was in code format. Moved question out of code formatted block.
Lyndon Vrooman
  • 6.1k
  • 27
  • 52

Facing issues in Identify button in selenium

I am working on 1 project, where i have to locate button, i have used xpath for same, but button id change on every refresh, so i am facing problem in it.. Below is screenshot for same - let me know you can i identify that button so that it will not cause error even if id changes

    <button type="button" id="ext-gen11" class=" x-btn-text">Login</button>

<tr>
                <td></td>
                <td><div id="LoginButton" style="float: left;"><table style="width: auto;" id="ext-comp-1032" class="x-btn x-btn-noicon x-btn-over x-btn-focus" cellspacing="0"><tbody class="x-btn-small x-btn-icon-small-left"><tr><td class="x-btn-tl"><i>&nbsp;</i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-ml"><i>&nbsp;</i></td><td class="x-btn-mc"><em class="" unselectable="on"><button class=" x-btn-text" id="ext-gen12" type="button">Login</button></em></td><td class="x-btn-mr"><i>&nbsp;</i></td></tr><tr><td class="x-btn-bl"><i>&nbsp;</i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i>&nbsp;</i></td></tr></tbody></table></div></td>
              </tr>
rohit ware
  • 155
  • 1
  • 3
  • 7