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.

Not Able to run the script on web elements

jssodhi1981jssodhi1981 Members
edited November -1 in Sahi - Open Source
hi pankaj
I am trying to record on webelement the Generated _click(_byId("el0"));
_click(_byId("el27"));, Again if I run script on new build id is changing so which property I can take to reconize,, I used innertext but it is not working

Please solve this
Thanks
Jaspreet

Comments

  • Hi,

    try this:
    _click(_byId(/el\d*/));

    Regards,
    Pankaj.
  • Pankaj,

    The issue is not about masking the ID. We want to be able to identify the appropriate screen and we want to do this by associating with the 'InnerText' element. If we use 'InnerText' field for directing to an appropriate page, the script stops functioning. Normally, the 'InnerText' is used for navigation purposes. So instead of using "click_byId" method, we would want to use "click_InnerText" method. But the script stops if we use this method.

    Can you let us know the solution. thank you
  • hi,
    is it displayed as a hyperlink? I mean is the innerText displayed as a hyperlink on your web page?
    if yes you can use something like this:

    _click(_link(_getText(top.document.getElementById("ID"));

    or i can say better if you can send a sample html of your page.

    Regards,
    Pankaj.
Sign In or Register to comment.