Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, windows and java based applications. Get your 30 day free trial.
Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com
Discuss your Sahi Pro usage patterns, best practices, problems and solutions. Help others solve their problems and seek help from the community when needed. If you need specific support on your application, please email support @ sahipro.com
Sahi doesn't work with Safari 5.0.1 on MacOSX
chrisyeem
Members
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 http://sahi.example.com/_s_/dyn/Driver_initialized
In the Terminal Window I see the following string of text
open -n -a Safari.app http://sahi.example.com/_s_/dyn/Driver_initialized
However in the Safari window that loads, I see the following string of text
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. On the same MacOSX machine Sahi also loads correctly in the browser for Firefox and Chrome.
I also tried the instructions located in this forum thread
http://sahi.co.in/forums/discussion/2339/memory-leak-with-safari/p1
which said
'''
In userdata.properties I set up:
ext.http.proxy.host=localhost
ext.http.proxy.port=9999
'''
and that did not seem to work either.
Any assistance would be appreciated.
In the Terminal Window I see the following string of text
open -n -a Safari.app http://sahi.example.com/_s_/dyn/Driver_initialized
However in the Safari window that loads, I see the following string of text
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. On the same MacOSX machine Sahi also loads correctly in the browser for Firefox and Chrome.
I also tried the instructions located in this forum thread
http://sahi.co.in/forums/discussion/2339/memory-leak-with-safari/p1
which said
'''
In userdata.properties I set up:
ext.http.proxy.host=localhost
ext.http.proxy.port=9999
'''
and that did not seem to work either.
Any assistance would be appreciated.
Best Answer
-
Sahi dashboard including the latest version 4.3 doesn't work for Safari. You will have to manually configure the proxy settings by following the instructions here: http://www.itechtalk.com/thread11334.html
Answers
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]
I'm at the point where I've updated Safari and the behavior is still the same. So my environment is Safari 6.0.2 with MacOSX 10.7.5 with Sahi v3.5 2011-07-19
And here is the contents of my browser configuration file located at /Applications/sahi/userdata/config/browser_types.xml . I presume that it's the default of the mac version of the browser config file :
<browserTypes>
<browserType>
<name>firefox</name>
<displayName>Firefox</displayName>
<icon>firefox.png</icon>
<path>open -n -a Firefox.app</path>
<options>--args -profile "$userDir/browser/ff/profiles/sahi$threadNo" -no-remote</options>
<processName>Firefox</processName>
<capacity>5</capacity>
<force>true</force>
</browserType>
<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>
<browserType>
<name>chrome</name>
<displayName>Chrome</displayName>
<icon>chrome.png</icon>
<path>open -n -a "Google Chrome.app"</path>
<options>--args --user-data-dir=$userDir/browser/chrome/profiles/sahi$threadNo --proxy-server=localhost:9999 --disable-popup-blocking</options>
<processName>"Google Chrome"</processName>
<capacity>5</capacity>
<force>true</force>
</browserType>
</browserTypes>
Mac OS: 10.8.2
Java Version: 1.6.0_37 (Java SE Runtime)
The install went OK, Sahi starts OK (albeit I need to open terminal and explicitly run start_dashboard.sh from the command line). The controller window opens OK. However, Safari opens with the same message as described by Chris.
(When opening Firefox or Chrome, I am seeing a permission denied error in the Sahi runtime logs -- and those browsers do not load. I am making that a separate post. I don't know if the two issues are related.)
I am shamelessly adding this comment because I am a Sahi OS/Sahi Forum newbie and want to make sure I don't lose track of this discussion thread
thanks for your responses! i really appreciate the info.
cheers