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.
_setFile with javascript event handlers
Hi Narayan,
What's the fix you gave for this?_setFile does not work me too.
I was trying to record _setFile as below,
and used the test button to check the result.
_setValue(_file("ODTPath"), "smoke.odt");
And i get following error message in test evaluation window,
[Exception] [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://lnx4.eldocomp.com:3002/_s_/spr/concat.js Line: 686"]
In my application/html page i have the following code.
<Input name="ODTPath" type="file" id="ODTPath" onkeypress="return onkeyPress(event);" size="65"/>
What's the fix you gave for this?_setFile does not work me too.
I was trying to record _setFile as below,
and used the test button to check the result.
_setValue(_file("ODTPath"), "smoke.odt");
And i get following error message in test evaluation window,
[Exception] [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location: "http://lnx4.eldocomp.com:3002/_s_/spr/concat.js Line: 686"]
In my application/html page i have the following code.
<Input name="ODTPath" type="file" id="ODTPath" onkeypress="return onkeyPress(event);" size="65"/>
Tagged:
Comments
Here's a link : http://sourceforge.net/projects/sahi/files/sahi-v2-nightly-unstable/sahi_20090715.zip/download
http://sourceforge.net/projects/sahi/files/
I am still not able to set the value when the type=file.
Sahi console does not give any error but,
test evaluation windows gives following error.
[Exception] [Exception... "Security error" code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)" location:
"http://lnx4.eldocomp.com:3002/_s_/spr/concat.js Line: 686"]
Narayan,Can you help me with this?
Yes we do have javascript which gets triggered,
Here's the source code
HTML Line :
<Input name="ODTPath" type="file" id="ODTPath" onkeypress="return onkeyPress(event);" size="65"/>
Javascript :
:
// On keyborad input event
function onkeyPress(e)
{
var key = window.event ? e.keyCode : e.which;
if (key == 13)
StartClick();
e.cancelBubble = true;
e.returnValue = false;
return false;
}