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.
How to use _isFF() or _isChrome() API in an if statement
I have a recorded a script in firefox. When i execute the same script in chrome or IE, it starts failing. Reason identified is because of the element properties. In firefox, link is identified as "Next" whereas in chrome, it is "NEXT".
Original Code: _click(_span("Next"));
I used the API, _isFF() and _isChrome() as below
Modified Code:
if(_isFF()); {_click(_link("Next")); }
if (_isChrome() == "True") { _click(_link("NEXT")); }
When i evaluate the expression, it works fine i.e. clicks the "Next" button but when i execute the script (run or step mode), it doesnt click the Next button. Below is the response i receive in the statements section:
setServerVar('___lastValue___1357886586296', _isFF());
setServerVar('___lastValue___1357886586402', _isChrome());
Kindly assist.
Original Code: _click(_span("Next"));
I used the API, _isFF() and _isChrome() as below
Modified Code:
if(_isFF()); {_click(_link("Next")); }
if (_isChrome() == "True") { _click(_link("NEXT")); }
When i evaluate the expression, it works fine i.e. clicks the "Next" button but when i execute the script (run or step mode), it doesnt click the Next button. Below is the response i receive in the statements section:
setServerVar('___lastValue___1357886586296', _isFF());
setServerVar('___lastValue___1357886586402', _isChrome());
Kindly assist.
Answers
The following usage (example code) of _isChrome and _isFF works properly for me in Sahi OS4.4 version both while using evaluate expression as well as while playing back the script.
Please try out the latest released Sahi OS version and let me know if the problem still persists for you.
Regards.