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 check if a link exists on a page ?

Divya_S12Divya_S12 Members
edited February 2014 in Sahi - Open Source
Following code was used to check if a link exists on a page

_assertExists(_link(START Errors - 2));
if (_condition(_link(START Errors - 2) != null)) {

_click(_checkbox("on"));
_click(_span("Proceed"));

}

else
{
}

However , when the link does not exists assertExists returns false and sahi scripts stops there.
Please assist.

Answers

This discussion has been closed.