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.
Firefox 25 And Sahi 4.4OS Do Not Like Each Other??
Hi Sahi Team / All,
When I run the script listed below:
IE 10, Google Chrome 31 and Safari 5.1.7 - all running on Windows 7 Professional
operating system with Java 1.7 installed - have no problems and the script completes
successfully.
However, if I try the script with Firefox 25 then the script fails.
Where it fails is in the first call to the function getsecnumval, and specifically on
the line that is getting the value for the variable $posnval.
What this line is doing is substringing the value of a label on the web page.
The error it throws, as taken from the log file, is as follows:
_setValue(_password("rand1"), getsecnumval(17));
TypeError: $posnval is undefined
getsecnumval@https://mivision.hsbc.co.uk/mv-m1-upgrade/pm/base/validate_security_number.asp?privacy=N&change_pass=False&returnUrl=:14
https://mivision.hsbc.co.uk/_s_/spr/concat.js:3480
Sahi.prototype.ex@https://mivision.hsbc.co.uk/_s_/spr/concat.js:3480
https://mivision.hsbc.co.uk/_s_/spr/concat.js:3267
If the problem was my script then all 4 browsers would complain. The fact that only
Firefox 25 throws a hissy fit suggests a falling out between Firefox 25 and Sahi
OS.
Thanks in advance.
When I run the script listed below:
<browser>
function getsecnumval($domval){
var $securitynum = "12345678";
var $posnval = _cell($domval).innerText;
var $numval = $posnval.substr(9, 1);
var $secnumval = $securitynum.substr($numval - 1, 1);
return $secnumval;
}
</browser>
// Primary Login Page
_setValue(_textbox("user_name"), "username");
_setValue(_password("user_password"), "password");
_click(_submit("Logon"));
// Second factor authentication page
_setValue(_password("rand1"), getsecnumval(17));
_setValue(_password("rand2"), getsecnumval(18));
_setValue(_password("rand3"), getsecnumval(19));
_click(_submit("Submit"));
_click(_link("Logoff"));
IE 10, Google Chrome 31 and Safari 5.1.7 - all running on Windows 7 Professional
operating system with Java 1.7 installed - have no problems and the script completes
successfully.
However, if I try the script with Firefox 25 then the script fails.
Where it fails is in the first call to the function getsecnumval, and specifically on
the line that is getting the value for the variable $posnval.
What this line is doing is substringing the value of a label on the web page.
The error it throws, as taken from the log file, is as follows:
_setValue(_password("rand1"), getsecnumval(17));
TypeError: $posnval is undefined
getsecnumval@https://mivision.hsbc.co.uk/mv-m1-upgrade/pm/base/validate_security_number.asp?privacy=N&change_pass=False&returnUrl=:14
https://mivision.hsbc.co.uk/_s_/spr/concat.js:3480
Sahi.prototype.ex@https://mivision.hsbc.co.uk/_s_/spr/concat.js:3480
https://mivision.hsbc.co.uk/_s_/spr/concat.js:3267
If the problem was my script then all 4 browsers would complain. The fact that only
Firefox 25 throws a hissy fit suggests a falling out between Firefox 25 and Sahi
OS.
Thanks in advance.
Best Answer
-
Hi davidjohnbird,
Thank you for providing everyone with the solution.
Sahi OS 4.4 (the latest version, release date : 2013-04-29) is a little outdated as compared to Sahi Pro. So there are plenty of fixes which are available in the Pro version and not in the OS version. They will be included in the next Sahi OS release.
Regards.
Answers
can you check the below post:-
http://sahi.co.in/sahi-pro-v50-whats-new/
Just one technical problem with your answer - I'm working with the free community edition, which is version 4.4. When will the free version be updated to fix this nasty bug?
The solution was, in the end, a simple one.
IE, Chrome and Safari have an attribute of innerText for this element. Firefox does not.
All the browsers have an attribute of innerHTML.
The moral of the tale is that if something fails in using an attribute in one browser but not another then check whether the attribute is valid for all browsers.