Forum Discussion

shahid24's avatar
shahid24
Contributor
7 years ago

How do I run same test in multiple browsers by parametersing the RunBrowser command

Hi,

 

I have a keyword test. I would like to paramateresie the running of it in  so it can run on diffrent browsers. I have followed the instructions here https://support.smartbear.com/testcomplete/docs/app-testing/web/general/cross-browser/parameterizing.html#_ga=2.2334896.1465516237.1510843737-581147978.1510843737

 

But when i run the test it gives me error "The specified browser 'btChrome' was not found in the collection of the supported browsers. To specify a browser, use either the btIExplorer, btFirefox, btChrome or btEdge constant, or use the browser's index (zero-based) in the collection"

 

Please see attached screenshots

 

Thanks,

Shahid

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    In your test items, how is your parameter defined? Because btChrome is an internal constant, you might need to pass it in as the numeric equivalent rather than the way you're doing it.  What it looks like is it's passing btChrome in as a string, not as the constant value.  try changing the values to "chrome", "iexplore", "firefox", "edge".

     

    Or, if you want to use the constant, 

    Index

    Specifies the browser instance you want to get. A browser can be specified via built-in constant, by the process name or by index within the collection:

    Browsers.Item(btIExplorer).Run()
    Browsers.Item("firefox").Run()
    Browsers.Item(0).Run()

    When specifying a browser via constant, the following values are acceptable:

    Constant Value Description
    btIExplorer -1 Microsoft Internet Explorer.
    btFirefox -2 Mozilla Firefox.
    btChrome -3 Google Chrome.
    btEdge -6 Microsoft Edge.

    When specifying a browser by its process name, the following values are acceptable: "firefox", "iexplore", "edge", and "chrome". The process names coincide with the values of ProcessName property of the respective Browser process.

    When specifying a browser by its collection index, keep in mind that the first item in the collection has index 0, the second - 1, and so on. The total number of items in the collection is specified by the Browsers.Count property.