0

I have to find the element "button-1510-btnIconEl", but the condition is, i have to find this element using Fluentlenium and without using css selector and xpath.

Any lead for this.

<div id="toolbar-1509" class="x-toolbar x-docked x-toolbar-footer x-docked-bottom x-toolbar-docked-bottom x-toolbar-footer-docked-bottom x-box-layout-ct" style="width: 518px; right: auto; left: 0px; top: 254px;">
<div id="toolbar-1509-innerCt" class="x-box-inner " role="presentation" style="width: 512px; height: 24px;">
<div id="toolbar-1509-targetEl" class="x-box-target" style="width: 512px;">
<a id="button-1510" class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-small x-noicon x-btn-noicon x-btn-default-small-noicon" tabindex="0" unselectable="on" hidefocus="on" role="button" style="right: auto; left: 431px; margin: 0px; top: 0px; width: 75px;">
<span id="button-1510-btnWrap" class="x-btn-wrap" unselectable="on">
<span id="button-1510-btnEl" class="x-btn-button">
<span id="button-1510-btnInnerEl" class="x-btn-inner x-btn-inner-center" unselectable="on">Close</span>
<span id="button-1510-btnIconEl" class="x-btn-icon-el " style="" unselectable="on" role="img"></span>
  • Everytime when the page is refreshed the element id has been changed (only numeric part). – Chandresh Pandey Jul 16 '15 at 07:18
  • Just curious: why do you want to avoid css selector and xpath? The first one works on all browsers and the second one only on FF and Chrome – Simon Mourier Jul 16 '15 at 07:52
  • 1
    have you gone through https://github.com/FluentLenium/FluentLenium ? FluentLenium is using cssLocators by default, so do not see any point in using FluentLenium and not going for CssLocators. – Kavan Jul 16 '15 at 08:54

0 Answers0