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.

Firefox not launching

anoop.philipanoop.philip Members
edited December 2011 in Sahi - Open Source
Firefox is not launching when i click the firefox button under "launch Browser". (tried using sahi 3.5 and 4.0 pro versions)

My operating system is windows 2003 server. Version of FF installed is 3.6.24. and the istallation path is C:\Program Files\Mozilla Firefox\firefox.exe

In the console it is showing the following error

C:\Program Files\Mozilla Firefox\firefox.exe -profile "C:\sahi_pro\userdata/brow
ser/ff/profiles/sahi0" -no-remote http://sahi.example.com/_s_/dyn/Driver_initial
ized?browserType=firefox
Dec 5, 2011 5:38:07 PM net.sf.sahi.ui.Dashboard execCommand
SEVERE: null
java.io.IOException: Cannot run program "C:\Program": CreateProcess error=193, %
1 is not a valid Win32 application
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at net.sf.sahi.util.Utils.executeCommand(Utils.java:580)
at net.sf.sahi.ui.Dashboard.execCommand(Dashboard.java:293)
at net.sf.sahi.ui.Dashboard.access$600(Dashboard.java:51)
at net.sf.sahi.ui.Dashboard$5$1.run(Dashboard.java:280)
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32
application
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 7 more

Comments

  • narayannarayan Administrators
    Hi Anoop,

    Open Sahi Dashboard -> Configure -> browser_types.xml
    Edit the firefox section and add quotes around the firefox path.

    For example, if it looks like
    <path>$ProgramFiles\Mozilla Firefox\firefox.exe</path>
    change it to
    <path>"$ProgramFiles\Mozilla Firefox\firefox.exe"</path>

    Restart Sahi and check.

    If the Firefox button is not visible any more, add
    <force>true</force> just before </browserType>

    Example:
        <browserType> 
            <name>firefox</name> 
            <displayName>Firefox</displayName>
            <icon>firefox.png</icon>
            <path>"$ProgramFiles\Mozilla Firefox\firefox.exe"</path>  
            <options>-profile "$userDir/browser/ff/profiles/sahi$threadNo" -no-remote</options>  
            <processName>firefox.exe</processName> 
            <capacity>5</capacity>  
                    <force>true</force>
        </browserType>
    


    Regards,
    Narayan
  • Thanks Narayan.
    It got working with the solution you provided.
    With the first line the FF button went hidden, when added the next line it got visible and launched.
This discussion has been closed.