Forum Discussion
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("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.