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.

Getting element id using visible text

vijaysaimsvijaysaims Members
edited May 2013 in Sahi - Open Source
Hi,

Is there any way to get the id of an element using the visible text of the element.

Eg: If the there is an element _span("Visit") and consider its id is generated randomly. Gow can I get the id?

Answers

  • Pratyush_TytoPratyush_Tyto Members
    edited June 2013
    Please use below code to get the id of the element.
    var $id= _span("Visit").id;
    Regards.
Sign In or Register to comment.