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.

Recorder improvement

JirkaJirka Members
edited November -1 in Sahi - Open Source
Hello,
I'm recording items on page using HTML IDs, because in our app they are immutable instead of the labels. But for the maintainance and readibility it's good to have in the script also the label, so at this moment, I record the ID and then manually append the comment with label for each line, like this:
_click(_submit("pt1:r1:0:pt1:cb1")); // New User Group
I wanted to ask if its possible to do this automatically. Is there in Sahi any template of the recorded elements or something similar which helps?

It would save lot of time. Thanks

Jirka

Comments

  • narayannarayan Administrators
    Hi Jirka,

    We may be able to add a "create comment with text" button which can record a comment with the label or text instead of an action.

    So click on the element generates
    _click(_submit("pt1:r1:0:pt1:cb1"));

    and then CTRL-Hover over the related element and clicking on "Add Text Comment" generates
    // New User Group
    to look like:

    _click(_submit("pt1:r1:0:pt1:cb1")); // New User Group

    Would that be useful?

    Regards,
    Narayan
  • Maybe this should be done in one step, because when you click the button to record it, you are redirected (in most cases) on another page, so then you are not able to CTRL-Hover the button.
    My idea is to choose from Alternatives menu after CTRL-Hover the template
    _click(_submit("<ID>")); // <LABEL>
Sign In or Register to comment.