18 January 2026:


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.

Cannot launch Test Suite with Google Chrome

ntammntamm Members
edited May 2012 in Sahi - Open Source
Hello,

I have about 20+ .sah file which I would like to run as a test suite. I have been able to successfully run a Test Suite using IE, Firefox and Safari however I cannot seem to launch the Test Suite in Google Chrome. I have tried running each .sah individually in Chrome and they do work. I cannot get the browser to launch after executing the testrunner.bat file....my command window just hangs there. I am also able to launch one instance of Chrome via the Sahi Dashboard.

Below is the output I get when running my testrunner.bat:

test=scripts/Chrome_Test.suite
browserType=chrome
baseURL=MY_URL
host=localhost
port=9999
threads=1
useSingleSession=true

suiteName = scripts/Chrome_Test.suite
base = MY_URL
sahiHost = localhost
port = 9999
threads = 1
browserType = chrome
this.isSingleSession == true
Added shutdown hook.
URL_REMOVED/_s_/dyn/Suite_start?suite=scripts%2Chrome_Test.suite
&base=http%3A%2F%2FURL_REMOVED&threads=1&sahisid=sahi_649
040a1160881158a5d9b0&browserType=chrome&useSingleSession=true&html=

....and then the CMD window that opens up just hangs there. Sahi fails to launch Chrome and fails to load the test suite into Chrome.

My browser_types.xml for Chrome is set-up as follows:


<browserType>
<name>chrome</name>
<displayName>Chrome</displayName>
<icon>chrome.png</icon>
<path>C:\Documents and Settings\Administrator\Local Settings\Application Data\Google\Chrome\Application\chrome.exe</path>
<options>--user-data-dir=$userDir\browser\chrome\profiles\sahi$threadNo --proxy-server=localhost:9999 --disable-popup-blocking</options>
<processName>chrome.exe</processName>
<capacity>5</capacity>
</browserType>


I have also created a batch file which I use to automate this execution:

CD %USERPROFILE%\sahi\userdata\bin\
testrunner.bat Chrome_Test.suite MY_URL chrome

I am using Sahi Version : V3.5
Build : 2011-07-19

I get this error on any OS I use...Windows XP, 7, 2003 Standard Server...doesn't matter which the errors occurs everywhere.



What am I doing wrong?



EDIT: URL_REMOVE and MY_URL are values I used so I could submit my question...these are actual values in my test suite.

Comments

  • narayannarayan Administrators
    Can you please check if this works on Sahi Pro?
    Thanks,
    Narayan
  • bagsmodebagsmode Members
    Does the browser_types.xml work with spaces in the path?
  • ntammntamm Members
    I ended up solving this out for my own. The only way I can get Chrome to launch a test suite is to create a batch file as follows:

    java -cp C:\sahi\lib\ant-sahi.jar net.sf.sahi.test.TestRunner -test C:\sahi\userdata\scripts\Test.suite -browserType chrome -baseURL "URL" -host localhost -port 9999 -threads 1

    I'm still not sure why I can't call the test suite via:
    testrunner.bat Chrome_Test.suite MY_URL chrome

    If it is an issue with spaces in the Chrome path, I'm not sure how I'd resolve that other than re-installing Chrome to a path with no spaces.
  • bagsmodebagsmode Members
    Not sure what to tell you; I have some paths with spaces, and I have no problem running the suites in Chrome. Perhaps the problem is elsewhere..? Suppose you could try to reinstall to space-less path. Not that big a deal to try is it?
  • ntammntamm Members
    edited May 2012
    bagsmode wrote:
    Not sure what to tell you; I have some paths with spaces, and I have no problem running the suites in Chrome. Perhaps the problem is elsewhere..? Suppose you could try to reinstall to space-less path. Not that big a deal to try is it?

    Yea it's strange, I have a few other browsers with spaces and they work fine...it's just Chrome. Oh well, my other method works for me. Thanks anyways!
Sign In or Register to comment.