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.
Not able to launch phantomjs using sahi in linux
Hello,
Can some one help me on this issue.
Sahi Version:5.1.2
phantomjs:1.9.7
We are using Sahi Java driver to automate our products, when we try to run the automation scripts in phantomjs in a linux machine, sahi not able to launch phantomjs, but the same script is working in firefox and chrome. Its not throwing any errors in the sahi console.
We need to fix this issue ASAP, because i need to run these on a linux server.
Please find the way i have configured
Copied the phantomjs into home/sahi_pro/ext/phantomjs folder and configured the path in browsertypes as shown below.
<browserType>
<name>phantomjs</name>
<displayName>PhantomJS</displayName>
<icon>safari.png</icon>
<path>$sahiDir/ext/phantomjs/phantomjs</path>
<options>--ignore-ssl-errors=yes --debug=yes --proxy=localhost:9999 /home/venkatesh.b/sahi_pro/ext/phantomjs/phantom-sahi.js</options>
<processName>phantomjs</processName>
<capacity>100</capacity>
<useSystemProxy>false</useSystemProxy>
</browserType>
Find the below error in ecclipse console
error:Playback session not started. Verify that proxy is set on the browser.
Below are the observation in the sahi console
WARNING: commandClass = >net.sf.sahi.command.Driver< commandMethod = >setStep<
Jul 21, 2014 7:32:11 PM net.sf.sahi.command.CommandExecuter execute
WARNING: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at net.sf.sahi.command.CommandExecuter.execute(CommandExecuter.java:41)
at net.sf.sahi.LocalRequestProcessor.handleDyn(LocalRequestProcessor.java:82)
at net.sf.sahi.LocalRequestProcessor.getLocalResponse(LocalRequestProcessor.java:29)
at net.sf.sahi.ProxyProcessor.processLocally(ProxyProcessor.java:199)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:68)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.sf.sahi.command.Driver.setStep(Driver.java:310)
at net.sf.sahi.command.Driver.setStep(Driver.java:150)
... 10 more
Jul 21, 2014 7:32:11 PM net.sf.sahi.test.ProcessHelper kill
INFO: PIDs not available yet. Waiting for 1 sec
Jul 21, 2014 7:32:12 PM net.sf.sahi.test.ProcessHelper kill
Thanks in advance.
Venkatesh
Can some one help me on this issue.
Sahi Version:5.1.2
phantomjs:1.9.7
We are using Sahi Java driver to automate our products, when we try to run the automation scripts in phantomjs in a linux machine, sahi not able to launch phantomjs, but the same script is working in firefox and chrome. Its not throwing any errors in the sahi console.
We need to fix this issue ASAP, because i need to run these on a linux server.
Please find the way i have configured
Copied the phantomjs into home/sahi_pro/ext/phantomjs folder and configured the path in browsertypes as shown below.
<browserType>
<name>phantomjs</name>
<displayName>PhantomJS</displayName>
<icon>safari.png</icon>
<path>$sahiDir/ext/phantomjs/phantomjs</path>
<options>--ignore-ssl-errors=yes --debug=yes --proxy=localhost:9999 /home/venkatesh.b/sahi_pro/ext/phantomjs/phantom-sahi.js</options>
<processName>phantomjs</processName>
<capacity>100</capacity>
<useSystemProxy>false</useSystemProxy>
</browserType>
Find the below error in ecclipse console
error:Playback session not started. Verify that proxy is set on the browser.
Below are the observation in the sahi console
WARNING: commandClass = >net.sf.sahi.command.Driver< commandMethod = >setStep<
Jul 21, 2014 7:32:11 PM net.sf.sahi.command.CommandExecuter execute
WARNING: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at net.sf.sahi.command.CommandExecuter.execute(CommandExecuter.java:41)
at net.sf.sahi.LocalRequestProcessor.handleDyn(LocalRequestProcessor.java:82)
at net.sf.sahi.LocalRequestProcessor.getLocalResponse(LocalRequestProcessor.java:29)
at net.sf.sahi.ProxyProcessor.processLocally(ProxyProcessor.java:199)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:68)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at net.sf.sahi.command.Driver.setStep(Driver.java:310)
at net.sf.sahi.command.Driver.setStep(Driver.java:150)
... 10 more
Jul 21, 2014 7:32:11 PM net.sf.sahi.test.ProcessHelper kill
INFO: PIDs not available yet. Waiting for 1 sec
Jul 21, 2014 7:32:12 PM net.sf.sahi.test.ProcessHelper kill
Thanks in advance.
Venkatesh