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.

fetch links

alamoonalamoon Members
edited November -1 in Sahi - Open Source
how to fetch link which belongs to a specfic title like:

<a title="Frankreich will Erneuerbare Energien stärken" href="index.php?id=51&tx_ttnews[pS]=1266335715&tx_ttnews[tt_news]=334&tx_ttnews[backPid]=60&cHash=10f4ee12a7">mehr</a>

Comments

  • narayannarayan Administrators
    Hi Alamoon,

    Open sahi/htdocs/spr/concat.js and change

    this.addAD({tag: "A", type: null, event:"click", name: "_link", attributes: ["sahiText", "id", "index", "href", "className"], action: "_click", value: "sahiText"});

    to

    this.addAD({tag: "A", type: null, event:"click", name: "_link", attributes: ["sahiText", "title|alt", "id", "index", "href", "className"], action: "_click", value: "sahiText"});

    Restart proxy, refresh browser cache and Sahi should identify links by title or alt also. It will be available by default in the next release.

    Regards,
    Narayan
  • thank you :-)
  • _alert(_link(title["Frankreich will Erneuerbare Energien staerken", _near]));

    is the right code to extract the link in:

    <a title="Frankreich will Erneuerbare Energien stärken" href="index.php?id=51&tx_ttnews[pS]=1266335715&tx_ttnews[tt_news]=334&tx_ttnews[backPid]=60&cHash=10f4ee12a7">mehr</a>

    ??
  • narayannarayan Administrators
    _alert(_link("Frankreich will Erneuerbare Energien staerken"))
Sign In or Register to comment.