18 January 2026:


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.

Sahi V2 proxy issues with AJAX

borisboris Members
edited November -1 in Sahi - Open Source
Hi,

We've just updated to the Sahi V2 release (20080831), but we're having problems with the proxy - it seems to be stripping out any AJAX calls (though this was fine in the previous Sahi release).

I have taken 2 screen shots (sorry, had to strip the www from the link as I'm not active enough and cannot post links)

This one was taken with no proxy. The table is displayed and populated using AJAX and everything looks good.
apotheosys.co.uk/tmp/no_proxy.jpg


This one was taken running through the Sahi V2 proxy, but for some reason the table and its contents are not getting through.
apotheosys.co.uk/tmp/withSahiV2_proxy.jpg

If anyone has any ideas as to why this may be happening, and maybe a possible work-a-round - it'll be much appreciated :)

Cheers,
Les.

Comments

  • narayannarayan Administrators
    Boris, which browser (and browser version) are you using? Could you also tell me what you see on the Sahi console (cmd prompt) when you access this page?

    -Narayan
  • Hi Narayan,

    Thanks for the reply.

    We are using Firefox 3.0.1. I can verify that the previous version of Sahi works fine with our webapp and Firefox 3.0.1

    Just to mention we get the problem with or without the Sahi Controller being up - i.e. as soon as we run Sahi on the console (and set the browser proxy settings), the AJAX side of our webapp stops working.

    Unfortunately the console output didn't give anything away, but I've added it below :)

    C:\sahi_v2\bin>sahi.bat
    C:\sahi_v2\bin>SET EXT_CLASS_PATH=;
    C:\sahi_v2\bin>SET EXT_CLASS_PATH=;;..\extlib\db\mysql-connector-java-5.0.4-bin.jar
    C:\sahi_v2\bin>SET SAHI_CLASS_PATH=..\lib\sahi.jar;..\extlib\rhino\js.jar
    C:\sahi_v2\bin>SET MOZ_NO_REMOTE=1
    C:\sahi_v2\bin>java -classpath ;;..\extlib\db\mysql-connector-java-5.0.4-bin.jar;..\lib\sahi.jar;..\extlib\rhino\js.jar net.sf.sahi.Proxy

    NOTE
    When running a suite, if you get an 'already running, but is not responding' error alert on firefox,
    don't worry, just click OK on the alerts and the next time you run the suite things will work fine.

    >>>> Sahi started. Listening on port:9999
    >>>> Configure your browser to use this server and port as its proxy
    >>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller

    Cheers.
  • narayannarayan Administrators
    Boris,

    Could you check if there are any javascript errors (using firebug or some other tool)? And would it be possible to email me (narayan @ sahi.co.in) the log file in sahi/logs/sahi.log? Stop Sahi, delete sahi.log, restart Sahi and navigate to your page and then email the generated log. That would help us pinpoint what could have happened.
  • Thanks Narayan,

    I couldn't see any JavaScript errors in Firebug.

    I've grabbed the log file and will e-mail it over to you shortly.

    Cheers,
    Les.
  • narayannarayan Administrators
    Les (at last!)

    Sahi was expecting a String url while dojo was sending its own object. Some AJAX calls which were made through dojo were failing.

    I have sent you a fix for it.

    For others facing similar problems, here is the fix for it: http://sahi.co.in/static/concat_patch_20080831.zip
    Unzip and replace concat.js in sahi/htdocs/spr/ with the new one.

    Restart Sahi and things should work fine.

    I will be releasing a patch soon.

    -Narayan
  • Hi Narayan,

    I've just tried the fix and it works :)

    Thanks for turning this around quckly.

    Cheers :)
Sign In or Register to comment.