Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

miss ; before statement

zhongfoxzhongfox Members
edited 11:25AM in Sahi - Open Source
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.

<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 src='/_s_/spr/playback.js'></script>


  • narayannarayan Administrators
    Hi zhongfox,

    Any more information on this? Could you try after turning off other firefox addons?

  • yes,now I mainly solved this issue, I found the sahi inject code was injected into a js file(though the file is asp file, but it is a javascript file)! so that is the problem,it should be injected into the html file, so my solution is:
    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.
  • narayannarayan Administrators
    Hi zhongfox,

    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.

  • Hi narayan,

    It's working and cleaner, thank you very much.

This discussion has been closed.