Forum Discussion

oleg_sigalov's avatar
oleg_sigalov
Occasional Contributor
10 years ago
Solved

All Browsers have the same "BrowserIndex" = 1

I'm trying to get in a dynamic way the browser object, because I'm running crossbrowsing. I've implemented this: bProc = "iexplore" or "chrome"   BrowserIndex = Sys.Browser(b...
  • jeff_meakins's avatar
    10 years ago
    From the help for BrowserIndex:




    The BrowserIndex property specifies the browser index among other running browsers with the same name.



    For example, if you have two different Firefox versions installed and both of them are currently running, the first launched Firefox process has BrowserIndex of 1 and the other one has BrowserIndex of 2.



    Similarly, if 32-bit and 64-bit versions of Internet Explorer are running at the same time on 64-bit Windows, one browser instance has BrowserIndex of 1 and the other one has BrowserIndex of 2.





    You have three separate browsers (IE, FF, Chrome), and each will have a BrowserIndex of 1 since there is only one instance for each type.



    Are you looking for the Browsers.Item() property to get the specific browser?






































    Constant

    Value

    Description

    btIExplorer

    -1

    Microsoft Internet Explorer.

    btFirefox

    -2

    Mozilla Firefox.

    btChrome

    -3

    Google Chrome.

    btOpera

    -4

    Opera by Opera Software.

    btSafari

    -5

    Apple Safari.