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.

[SOLVED]Could not connect to Sahi proxy

WidunderWidunder Members
edited December 2011 in Sahi - Open Source
•OS Name Windows 7
•Browser Name and version IE dont know the version
•Sahi Build (Available on Sahi controller's Info tab) Sahi Build 3.5


Hello,
I'm trying to use Sahi on a computer at work. I've tried everything now what has been listed in help to configure the proxy, but it's still wouldn't work.
I get the following error:
"Connection refused: connect
Could not connect to Sahi Proxy.
Verify that the Sahi Proxy is running on the specified host and port."
How can I verify it? How do I run it? All I'm trying to do is to call to the program so it runs one of the test scripts through a batch file. This is for me to integrate a batch file into FitNess and call to the batch file to automatically start the testing without running the program manually. Or is there a better way of doing this? The testing works only manually at this stage.
This is another thing I've tried, in my batch file:
<at>ECHO OFF
cd <folder location>
call "testrunner.bat test.sah <web site here> ie"
But all that does is opening and closes.
Thank you.

Comments

  • Another strange thing I've found is that when I open my web-page in IE - it doesn't ask me for login name and password and opens up straight away. But everytime I open it up in Mozilla - it always come up with authentication request. I'm wondering if I can't connect because of that? How do I check this? What do I do?
  • have you set the browser proxy as localhost:9999?
  • narayannarayan Administrators
    Sahi has to be running first, before you invoke testrunner.bat
    You can start Sahi by going to userdata/bin and running either start_dashboard.bat or start_sahi.bat
    (or double click on the desktop shortcut for Sahi)
  • Thank you very much for such a quick response.
    Everything works fine now. The only thing is that when the page gets loaded my script isn't being ran. This is what my script contains:
    _click(_link("Today"));
    _click(_link("KPI's Yesterday"));
    _click(_link("Weekly Plan"));
    _click(_link("Reports"));
    But unfortunately I see nothing happening on the page. Is that normal?
    Thank you.
  • Hi Widunder,

    Could you please let me know if the page is loaded properly?

    Also, check if you are getting any error on Sahi console.

    Are you facing this issue on all browsers?

    Regards
    Sumitra
  • WidunderWidunder Members
    edited December 2011
    Hi Sumitra,
    The page loads up properly. The console seems to await for some sort of action, it's not giving any errors unless I close the page. My web-site is only supported by IE, so that's the only browser I'm using for this.
    The vestion of IE I'm using is 9. Would it make big difference to how Sahi handles IE 8? My script works in Sahi when I use Play-Back feature on the dashboard. It's just when I use cmd.exe my script isn't being ran by testrunner.bat although it looks like it's working, it's just not running the commands.
    Thank you
  • Hi Widunder,

    Could you post the <browserType> contents for IE9 by clicking on Configure on the Dashboard.

    Also, if the <options> for IE9 is: <options>-noframemerging</options> then change it to <options></options> . Restart Sahi.

    Check if this solves your issue.

    Regards
    Sumitra
  • WidunderWidunder Members
    edited December 2011
    No, still same problem. Page opens up, script isn't automatically starting. I can invoke the window to use play-back. But this isn't what I want. I want the script automatically start as soon as the page loads up.
  • narayannarayan Administrators
    Hi,
    Make sure that your browser_types xml has something like this:

    <browserType>
    <name>ie</name>
    <displayName>IE 9</displayName>
    <icon>ie.png</icon>
    <path>$ProgramFiles\Internet Explorer\iexplore.exe</path>
    <options>-noframemerging</options>
    <processName>iexplore.exe</processName>
    <useSystemProxy>true</useSystemProxy>
    <capacity>5</capacity>
    </browserType>

    <options>-noframemerging</options> is required. (Sumitra's answer is not right)

    Also open IE, and add sahi.example.com to trusted sites. IE -> Tools -> Internet Options -> Security Tab -> Trusted Sites -> Sites -> http://sahi.example.com (You may need to uncheck "Require server verification (https:) for all sites in this zone")

    Restart and check.

    If this still does not work, please drop an email to support@sahi.co.in with mention to this forum thread, and we will set up a desktop sharing session to see what may be wrong.

    Regards,
    Narayan
  • Thank you very much! It's works perfectly now! :)
This discussion has been closed.