18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to get the tool tip text?

sharathsharath Members
edited November 2013 in Sahi - Open Source

<em id="button-1118-btnWrap" class=""><button id="button-1118-btnEl" class="x-btn-center" autocomplete="off" role="button" hidefocus="true" type="button" data-qtip="First Page" aria-disabled="true" disabled=""></button></em>

tool tip text should be retrieved from data-qtip attribute.

Best Answer

  • Hi Sharath,

    I guess data-qtip is an attribute( you can verify), and assuming it as an attribute:-
    you can use
    _set($tooltip, _button("button-1118-btnE").getAttribute("data-qtip");

    Regards,
    Bhavitha

Answers

  • Hi Bhavitha,

    I tried the equivalent java snipet, getAttribute() seems to work only for id and few other attributes, but doesn't seem to work for "data-qtip" attribute.

    String toolTip=browser.button("button-1118-btnE").getAttribute("data-qtip");
    System.out.println(toolTip);

    O/p
    Undefined

    Regards,
    shArath
Sign In or Register to comment.