18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
the 'in' operator
I have a checkbox that is inside of a div. The id of the div toggles when the user checks the checkbox.
I was hoping to use the 'in' operator to force sahi to find the checkbox and be able to retrieve the checkbox's value ( if it is checked or not).
I have used this script and it fails.
_assertTrue(_checkbox("justlisted_check").in(_div("cbjar")).checked==false,"Just Listed box unchecked");
I got an error saying that "in" is not an operator. I was unable to find further examples or info on 'in'. your guidance is much appreciated.
I was hoping to use the 'in' operator to force sahi to find the checkbox and be able to retrieve the checkbox's value ( if it is checked or not).
I have used this script and it fails.
_assertTrue(_checkbox("justlisted_check").in(_div("cbjar")).checked==false,"Just Listed box unchecked");
I got an error saying that "in" is not an operator. I was unable to find further examples or info on 'in'. your guidance is much appreciated.
Best Answer
-
Hi Leoa,
The correct way to use it is
_assertTrue(_checkbox("justlisted_check", _in(_div("cbjar"))).checked==false,"Just Listed box unchecked");
Regards,
Narayan