Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

How to know whether or not a element exist on page

ziscloudziscloud Members
Hi All,

I try to use this code to verify whether a element exist on the page:

if (_condition(_link($label) != null)) {
_click(_radio(0, _near(_link($label))));
} else {
_click(_cell(0, _near(_cell($label))));

Some times it is work fine, but some times even there is a link element, it also clicks the cell element!

I have used the sahi controller to verity _assertExists(_link("xxxx")), it return true, but in the script

_condition(_link($label) != null)

return false and click the cell element.

is it a bug of sahi, please verify!


Sign In or Register to comment.