Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ sahipro.com with your query.

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.