Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed Sahi Open Source on Mac OS X v10.6.4 and it installed correctly and the dashboard loads properly. However, Sahi doesn't work with the Safari 5.0.1 that is installed on the machine. When I click on Safari in the list of browsers, it attempts to load s/dyn/Driver_initialized">http://sahi.example.com/s/dyn/Driver_initialized

In the Terminal Window I see the following string of text open -n -a Safari.app s/dyn/Driver_initialized">http://sahi.example.com/s/dyn/Driver_initialized

However in the Safari window that loads, I see the following string of text in the Safari window

Safari can’t find the server. Safari can’t open the page “http://sahi.example.com/s/dyn/Driver_initialized” because Safari can’t find the server “sahi.example.com”.

This Mac that I'm using is a loaner, however I checked and I don't see any proxies enabled in the System Preferences. I am also running Sahi on Safari for Windows and it works fine there.

I tried changing the following userdata.properties settings: ''' ext.http.proxy.host=localhost ext.http.proxy.port=9999 '''

and that did not seem to work either.

Below is the terminal output of Sahi when I try to use it perform automated operations without the system wide proxy setting Everything before the exception takes place at the time that I try to use it. Everything from the exception to the end takes place when I see it's not working and I close Sahi Dashboard

Jan 9, 2013 11:47:48 AM net.sf.sahi.test.ProcessHelper execute
INFO: open -n -a Safari.app http://sahi.example.com/_s_/dyn/Driver_start?sahisid=50eda4d8b07c5__SahiAmpersandSahi__startUrl=http://sahi.example.com/_s_/dyn/Driver_initialized?startUrl=
Socket closed
Jan 9, 2013 11:48:00 AM net.sf.sahi.util.ProxySwitcher execCommand
SEVERE: null
java.io.IOException: Cannot run program "/sahi/tools/proxy_config.exe": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)
at java.lang.Runtime.exec(Runtime.java:593)
at java.lang.Runtime.exec(Runtime.java:466)
at net.sf.sahi.util.Utils.executeCommand(Utils.java:528)
at net.sf.sahi.util.ProxySwitcher.execCommand(ProxySwitcher.java:40)
at net.sf.sahi.util.ProxySwitcher.revertSystemProxy(ProxySwitcher.java:24)
at net.sf.sahi.ui.Dashboard$3.windowClosing(Dashboard.java:240)
at java.awt.AWTEventMulticaster.windowClosing(AWTEventMulticaster.java:332)
at java.awt.Window.processWindowEvent(Window.java:1862)
at javax.swing.JFrame.processWindowEvent(JFrame.java:274)
at java.awt.Window.processEvent(Window.java:1820)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.io.IOException: error=13, Permission denied
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:53)
at java.lang.ProcessImpl.start(ProcessImpl.java:91)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)
... 21 more
logout

[Process completed]

Any assistance would be appreciated.

share|improve this question
    
The only time it did work was when I manually set the 127.0.0.1:9999 proxy in the System Preferences. Then it worked –  TinyGrasshopper Jan 8 '13 at 23:38
    
I need to update this comment above. When I change the system wide proxy and run it, it only gets me as far as the page sahi.example.com/s/dyn/Driver_initialized , but if I tried to use it to actually run automated tests, and I tried to open another webpage that doesn't work, the browser just sits there. –  TinyGrasshopper Jan 9 '13 at 17:03
    
Here is a link to a screenshot of the issue –  TinyGrasshopper Jan 16 '13 at 19:19
    
And here is the excerpt of the Safari section for /Applications/sahi/userdata/config/browser_types.xml <browserType> <name>safari</name> <displayName>Safari</displayName> <icon>safari.png</icon> <path>open -n -a Safari.app</path> <options> </options> <processName>Safari</processName> <capacity>5</capacity> <force>true</force> </browserType> –  TinyGrasshopper Jan 16 '13 at 19:20

1 Answer 1

up vote 0 down vote accepted

In case Sahi OS is not able to set the proxy, you can manually change the proxy before the test run. You may also look at Sahi Pro which supports this out of the box.

share|improve this answer
1  
Thanks, I eventually figured out that that was the problem. That plus making sure that Sahi itself is kept up-to-date seems to fix the problem. –  TinyGrasshopper Jun 7 '13 at 13:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.