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 and phantomJs
Hi,
I've installed Sahi under ubuntu 13.10 x64 and it works pretty well. I want to try a load test on a local site so I've installed (from repository) phantomJs. I've followed this: http://sahi.co.in/w/sahi-headless-execution-with-phantomjs
I've created in ~/sahi/extlib/ a file called sahi.js and in browser-type I've putted:
when I try to run
sh testrunner.sh ../scripts/myScript.sah http://127.0.0.1/myHost phantomjs
no phantomJs instance is launched. On sahi proxy I can see myScript is running but no browser instace (and no logs written).
Someone can explain me why?
I've installed Sahi under ubuntu 13.10 x64 and it works pretty well. I want to try a load test on a local site so I've installed (from repository) phantomJs. I've followed this: http://sahi.co.in/w/sahi-headless-execution-with-phantomjs
I've created in ~/sahi/extlib/ a file called sahi.js and in browser-type I've putted:
<browserType>
<name>phantomjs</name>
<displayName>PhantomJS</displayName>
<icon>safari.png</icon>
<path>/usr/bin/phantomjs</path>
<options>--proxy=localhost:9999 $userDir/sahi/extlib/sahi.js</options>
<processName>phantomjs</processName>
<capacity>5</capacity>
</browserType>
In sahi.js i've putted:
if (phantom.args.length === 0) {
console.log('Usage: sahi.js <Sahi Playback Start URL>');
phantom.exit();
} else {
var address = phantom.args[0];
console.log('Loading ' + address);
var page = new WebPage();
page.open(address, function(status) {
if (status === 'success') {
var title = page.evaluate(function() {
return document.title;
});
console.log('Page title is ' + title);
} else {
console.log('FAIL to load the address');
}
});
}
when I try to run
sh testrunner.sh ../scripts/myScript.sah http://127.0.0.1/myHost phantomjs
no phantomJs instance is launched. On sahi proxy I can see myScript is running but no browser instace (and no logs written).
Someone can explain me why?
Answers