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.

Update Browser Type options

Hi,

I need to change the values in <options> tag under <browsertype> as per the tasks. I tried to update the system environment variable through ANT Task. and called that variable to <options> tag. Its possible to update by ANT, but if changes needs to be reflected in sahi, I should Restart it. Is there any way to do the same with out restarting Sahi...?

set system environment variable 'vpath' is : "D:/abcd"
my profiles are saved in "D:/abcd:/profiles"

<browserType>
<name>firefox1</name>
<displayName>Firefox</displayName>
<icon>firefox.png</icon>
<path>$ProgramFiles\Mozilla Firefox\firefox.exe</path>
<options>-profile "$vpath/profiles/sahi$threadNo" -no-remote</options>
<processName>firefox.exe</processName>
<capacity>1</capacity>
</browserType>

Best Answer

  • The much I know from Sahi OS....
    public class BrowserTypesLoader {
      private static Map<String, BrowserType> browserTypes = new HashMap<String, BrowserType>();
    
      static {
        loadBrowserTypes();
      }
    }
    

    so loadBrowserTypes() is only called once and there is no way to load others without a restart

Answers

  • hai I got the solution..

    <target name="a">
    <var name="trgt" value="D:\Automation\sahi\userdata\scripts\s135_Login2.sah"/>
    <var name="vpath" value="D:/path2"/>
    <sahi suite="${trgt}"
    browser="C:\Program Files\Mozilla Firefox\firefox.exe"
    baseurl="http://xxx.xxx.xxx.xxx:8080/";
    sahihost="localhost"
    sahiport="9999"
    failureproperty="sahi.failed"
    haltonfailure="false"
    browserprocessname="firefox.exe"
    browseroption="-profile ${vpath}/profiles/sahi$threadNo -no-remote"
    threads="1">
    </sahi>
    </target>


    ** but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...

    logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []


    PID is not getting , so sahi can't kill the process...
  • vinilnarayanvinilnarayan Members
    edited October 2014
    hai I got the solution..

    <target name="a">
    <var name="trgt" value="D:\Automation\sahi\userdata\scripts\s135_Login2.sah"/>
    <var name="vpath" value="D:/path2"/>
    <sahi suite="${trgt}"
    browser="C:\Program Files\Mozilla Firefox\firefox.exe"
    baseurl="http://xxx.xxx.xxx.xxx:8080/";
    sahihost="localhost"
    sahiport="9999"
    failureproperty="sahi.failed"
    haltonfailure="false"
    browserprocessname="firefox.exe"
    browseroption="-profile ${vpath}/profiles/sahi$threadNo -no-remote"
    threads="1">
    </sahi>
    </target>


    ** but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...

    logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []


    PID is not getting , so sahi can't kill the process...
  • hai I got the solution..

    <target name="a">
    <var name="trgt" value="D:\Automation\sahi\userdata\scripts\s135_Login2.sah"/>
    <var name="vpath" value="D:/path2"/>
    <sahi suite="${trgt}"
    browser="C:\Program Files\Mozilla Firefox\firefox.exe"
    baseurl="http://xxx.xxx.xxx.xxx:8080/";
    sahihost="localhost"
    sahiport="9999"
    failureproperty="sahi.failed"
    haltonfailure="false"
    browserprocessname="firefox.exe"
    browseroption="-profile ${vpath}/profiles/sahi$threadNo -no-remote"
    threads="1">
    </sahi>
    </target>


    ** but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...

    logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []


    PID is not getting , so sahi can't kill the process...
  • hai I got the solution..

    but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...

    logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []


    PID is not getting , so sahi can't kill the process...
  • hai I got the solution..
    but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...
    "logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []"
    PID is not getting , so sahi can't kill the process...
  • hai I got the solution..
    but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...
    "logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []"
    PID is not getting , so sahi can't kill the process...
  • hai I got the solution..
    but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...
    "logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []"
    PID is not getting , so sahi can't kill the process...
  • hai I got the solution..
    but the problem is :( once the browser is opened and it will not close.
    when I check the sahi log I got like...
    "logsInfo=
    Killing D:/Automation/sahi/userdata/scripts/s135_Login.sah pids: []"
    PID is not getting , so sahi can't kill the process...
Sign In or Register to comment.