18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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 - Mac OS X
Hi all,
I've experienced a bit of difficulty in getting Sahi to work on Mac OS X. The command I am trying to execute is as follows...
VMSAHIXP is the proxy (Windows XP), where Sahi is installed as a service. The service logs display this message when the Mac task is run:
#### Running Script:
\Sahi\01-Scripts\00-System\LicenseeConfig.sah
Additionally, all scripts/suites are Hosted on the Windows machine (as /Volumes/Sahi on the Mac).
And it remains that way until eventually it times out, as per the below log from the Windows service:
On the Mac itself, the command appears to execute without error, however the browsers are not launching. Entering the browser path manually into a terminal will launch the browser correctly, and I have verified that I can access local and Internet web pages when loading the browser manually (using VMSAHIXP as the proxy
Hope this hasn't been asked before - I did a forum search and found a thread around batch testing on Mac OS X, unfortunately it does not seem to address browser launch failures.
Please feel free to let me know if more information is required.
For now...
Java version: 1.5.0_26
Firefox (Mac): 3.0.19
Safari (Mac): 5.0.3
Mac OS: OS X 10.5.8
Sahi Proxy: Windows XP SP3
Sahi Build: 2010-11-03
Any help would be greatly appreciated!
Edit: I forgot to mention that executing the same suites on VMSAHIXP (using localhost as the proxy) launches the browsers and runs the tests as intended.
I've experienced a bit of difficulty in getting Sahi to work on Mac OS X. The command I am trying to execute is as follows...
java -cp /Volumes/Sahi/02-ProgramFiles/lib/ant-sahi.har net.sf.sahi.test.TestRunner "../../01-Scripts/zz-Suites/01-LicenseeConfig.suite" "/Applications/Firefox.app/Contents/MacOS/Firefox" "<url>" "/Volumes/Sahi/03-Logs/Mac" VMSAHIXP 9999 1 "Firefox" "-profile browser/ff/profiles/sahi$threadNo -no-remote"
VMSAHIXP is the proxy (Windows XP), where Sahi is installed as a service. The service logs display this message when the Mac task is run:
#### Running Script:
Additionally, all scripts/suites are Hosted on the Windows machine (as /Volumes/Sahi on the Mac).
And it remains that way until eventually it times out, as per the below log from the Windows service:
INFO | jvm 1 | 2011/02/02 10:12:59 | >>>>>> Tests size = 1
INFO | jvm 1 | 2011/02/02 10:12:59 | #### Running Script: D:\Sahi\01-Scripts\00-System\LicenseeConfig.sah
INFO | jvm 1 | 2011/02/02 10:13:36 | Rhino lib:Step >_sahi._click(_sahi._submit("Edit"));< did not complete in 150 seconds.
INFO | jvm 1 | 2011/02/02 10:13:39 | Rhino lib:Step >_sahi._click(_sahi._submit("Save"));< did not complete in 150 seconds.
INFO | jvm 1 | 2011/02/02 10:13:54 | Killing D:\Sahi\01-Scripts\00-System\LicenseeConfig.sah
INFO | jvm 1 | 2011/02/02 10:13:54 | 02/02/2011 10:13:54 AM net.sf.sahi.test.ProcessHelper kill
INFO | jvm 1 | 2011/02/02 10:13:54 | INFO: Kill: null
INFO | jvm 1 | 2011/02/02 10:13:54 | java.lang.NullPointerException
INFO | jvm 1 | 2011/02/02 10:13:54 | at net.sf.sahi.test.ProcessHelper.killPIDs(ProcessHelper.java:172)
INFO | jvm 1 | 2011/02/02 10:13:54 | at net.sf.sahi.test.ProcessHelper.kill(ProcessHelper.java:165)
INFO | jvm 1 | 2011/02/02 10:13:54 | at net.sf.sahi.test.BrowserLauncher.kill(BrowserLauncher.java:80)
INFO | jvm 1 | 2011/02/02 10:13:54 | at net.sf.sahi.test.TestLauncher.kill(TestLauncher.java:128)
INFO | jvm 1 | 2011/02/02 10:13:54 | at net.sf.sahi.test.SahiTestSuite.notifyComplete2(SahiTestSuite.java:179)
INFO | jvm 1 | 2011/02/02 10:13:54 | at net.sf.sahi.test.SahiTestSuite.notifyComplete(SahiTestSuite.java:168)
INFO | jvm 1 | 2011/02/02 10:13:54 | at net.sf.sahi.rhino.RhinoScriptRunner.stop(RhinoScriptRunner.java:245)
INFO | jvm 1 | 2011/02/02 10:13:54 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2011/02/02 10:13:54 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2011/02/02 10:13:54 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2011/02/02 10:13:54 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2011/02/02 10:13:54 | at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
INFO | jvm 1 | 2011/02/02 10:13:54 | at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
INFO | jvm 1 | 2011/02/02 10:13:54 | at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3330)
INFO | jvm 1 | 2011/02/02 10:13:54 | at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2487)
INFO | jvm 1 | 2011/02/02 10:13:54 | at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:164)
INFO | jvm 1 | 2011/02/02 10:13:55 | at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:398)
INFO | jvm 1 | 2011/02/02 10:13:55 | at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3065)
INFO | jvm 1 | 2011/02/02 10:13:55 | at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:175)
INFO | jvm 1 | 2011/02/02 10:13:55 | at org.mozilla.javascript.Context.evaluateString(Context.java:1104)
INFO | jvm 1 | 2011/02/02 10:13:55 | at net.sf.sahi.rhino.RhinoScriptRunner.run(RhinoScriptRunner.java:147)
INFO | jvm 1 | 2011/02/02 10:13:55 | at java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2011/02/02 10:16:21 | Rhino lib:Step >_sahi.setServerVar('___lastValue___1296602016574', _sahi._containsText(document.body, "Unexpected Error"));< did not complete in 150 seconds.
INFO | jvm 1 | 2011/02/02 10:16:22 | Killing D:\Sahi\01-Scripts\04-CustomReports\05-Expenses\FilterByDate.sah
INFO | jvm 1 | 2011/02/02 10:16:22 | 02/02/2011 10:16:22 AM net.sf.sahi.test.ProcessHelper kill
INFO | jvm 1 | 2011/02/02 10:16:22 | INFO: Kill: [1848]
INFO | jvm 1 | 2011/02/02 10:16:23 | Rhino lib:Step >_sahi.setServerVar('___lastValue___1296602019027', _sahi._containsText(document.body, "Unexpected Error"));< did not complete in 150 seconds.
INFO | jvm 1 | 2011/02/02 10:16:25 | Killing D:\Sahi\01-Scripts\04-CustomReports\05-Expenses\FilterByDate.sah
INFO | jvm 1 | 2011/02/02 10:16:25 | 02/02/2011 10:16:25 AM net.sf.sahi.test.ProcessHelper kill
INFO | jvm 1 | 2011/02/02 10:16:25 | INFO: Kill: [2400, 2040]
On the Mac itself, the command appears to execute without error, however the browsers are not launching. Entering the browser path manually into a terminal will launch the browser correctly, and I have verified that I can access local and Internet web pages when loading the browser manually (using VMSAHIXP as the proxy
Hope this hasn't been asked before - I did a forum search and found a thread around batch testing on Mac OS X, unfortunately it does not seem to address browser launch failures.
Please feel free to let me know if more information is required.
For now...
Java version: 1.5.0_26
Firefox (Mac): 3.0.19
Safari (Mac): 5.0.3
Mac OS: OS X 10.5.8
Sahi Proxy: Windows XP SP3
Sahi Build: 2010-11-03
Any help would be greatly appreciated!
Edit: I forgot to mention that executing the same suites on VMSAHIXP (using localhost as the proxy) launches the browsers and runs the tests as intended.
Comments
Have a look at the last post on this thread about running Sahi as a service. http://sahi.co.in/forums/viewtopic.php?id=1352
It talks about how to get IE working visibly when using Sahi as a service.
Regards,
Narayan