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.
miss ; before statement
Hi all,
I'm a new user of sahi, it is great, but I got a error when use it to test a https web,firebug say "miss ; before statement ", the position is before the second "<script";
I tried sahi_20100820 and sahi_20101103, both have this error. can you help me,thanks.
<!--SAHI_INJECT_START-->
<script>/*<![CDATA[*//*---->*/__sahiDebugStr__="";__sahiDebug__=function(s){__sahiDebugStr__+=(s+"\n");};/*--*//*]]>*/</script>
<script src="/_s_/spr/domainfix.js"></script>
<script src='/_s_/spr/concat.js' id='_sahi_concat'></script>
.......
<script src='/_s_/spr/language_pack.js' id='langpack'></script>
<script>/*<![CDATA[*//*---->*/_sahi.createCookie('sahisid', _sahi.sid);_sahi.loadXPathScript()/*--*//*]]>*/</script>
<script>/*<![CDATA[*//*---->*/eval(_sahi.sendToServer("/_s_/dyn/Player_script/script.js"));/*--*//*]]>*/</script>
<script src='/_s_/spr/playback.js'></script>
<!--SAHI_INJECT_END-->
I'm a new user of sahi, it is great, but I got a error when use it to test a https web,firebug say "miss ; before statement ", the position is before the second "<script";
I tried sahi_20100820 and sahi_20101103, both have this error. can you help me,thanks.
<!--SAHI_INJECT_START-->
<script>/*<![CDATA[*//*---->*/__sahiDebugStr__="";__sahiDebug__=function(s){__sahiDebugStr__+=(s+"\n");};/*--*//*]]>*/</script>
<script src="/_s_/spr/domainfix.js"></script>
<script src='/_s_/spr/concat.js' id='_sahi_concat'></script>
.......
<script src='/_s_/spr/language_pack.js' id='langpack'></script>
<script>/*<![CDATA[*//*---->*/_sahi.createCookie('sahisid', _sahi.sid);_sahi.loadXPathScript()/*--*//*]]>*/</script>
<script>/*<![CDATA[*//*---->*/eval(_sahi.sendToServer("/_s_/dyn/Player_script/script.js"));/*--*//*]]>*/</script>
<script src='/_s_/spr/playback.js'></script>
<!--SAHI_INJECT_END-->
This discussion has been closed.
Comments
Any more information on this? Could you try after turning off other firefox addons?
Regards,
Narayan
find the file ...\sahi\config\inject_top.txt;comment out the content of it with "/**/", do not delete it or using "//";
that is because sahi inject some javascript code into both html and js files, but it should only inject into html files, so when using "/**/", the injected code in js files are commented out, but the code is still in html files. only problem is when tesing, there may be a "/**/" showing in the web page.
Im a chinese.sorry for maybe some english syntax problem.
Nice solution. If you want a cleaner solution:
1) Undo the changes you made to inject_top.txt
2) Open sahi/userdata/config/exclude_inject.txt
3) Add your URL pattern for the javascript asp page there.
Restart Sahi, clear browser cache, and your javascript file should no longer be injected with Sahi code.
Regards,
Narayan
It's working and cleaner, thank you very much.
Regards,
Zhong