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 detect which browser is being used?
I'd like to have the browser type and version reported to the log file so that I know which browser and version was tested in the case a failure is specific to a browser/version.
EDIT: I see the isIE, is IE9, isFF, etc. .. however you don't have all the versions. For example, for FireFox (FF) I'm currently testing for FF3.6, FF9, FF10 and FF11. I have found functions for isFF, isFF2, isFF3 and isFF4; but nothing for 9, 10, or 11. I would like to know if there is a failure, if it's specific to a particular browser and/or version.
I also see in the Browser.java file in the client directory, that you use BrowserName. Can we somehow access that instead of recreating a case statement using all the isXX API's?
Kind Regards,
Glenn
EDIT: I see the isIE, is IE9, isFF, etc. .. however you don't have all the versions. For example, for FireFox (FF) I'm currently testing for FF3.6, FF9, FF10 and FF11. I have found functions for isFF, isFF2, isFF3 and isFF4; but nothing for 9, 10, or 11. I would like to know if there is a failure, if it's specific to a particular browser and/or version.
I also see in the Browser.java file in the client directory, that you use BrowserName. Can we somehow access that instead of recreating a case statement using all the isXX API's?
Kind Regards,
Glenn
Comments
try _alert(_sahi.getDiagnostics()) and evaluate the output to get the used browser.
Regards
Wormi
Thank you Wormi, this is exactly what I'm looking for
Kind Regards,
Glenn