This functionality is supported only if you are using the Open Agent.
This topic describes how you can set the browser when executing automated tests from a command-line interface, for example from a CI server or from Silk Central. For information on how to set the browser for test replay from the UI, see Changing the Browser Type When Replaying Tests.
[ ] const BROWSER_TYPE_INTERNET_EXPLORER = "InternetExplorer" [ ] const BROWSER_TYPE_FIREFOX = "Firefox" [ ] const BROWSER_TYPE_CHROME = "GoogleChrome" [ ] const BROWSER_TYPE_ANDROID_BROWSER = "AndroidBrowser" [ ] const BROWSER_TYPE_SAFARI = "Safari" [ ] const BROWSER_TYPE_EDGE = "Edge"
[-] window BrowserApplication WebBrowser [ ] locator "//BrowserApplication" [ ] [ ] // The start URL [ ] const sUrl = "http://demo.borland.com" [ ] [ ] STRING sBrowserType = NULL [ ] STRING sConnectionString = NULL [ ] STRING sCmdLine = NULL [ ] [ ] const bCloseOtherTabs = TRUE
[-] testcase OpenGMOAjaxAppIE () appstate none [ ] WebBrowser.sBrowserType = BROWSER_TYPE_INTERNET_EXPLORER [ ] WebBrowser.sCmdLine = "C:\\Program Files\\Internet Explorer\\iexplore.exe" // Optional [ ] DefaultBaseState() [ ] WebBrowser.BrowserWindow.DemoApplication.Select()
[-] testcase OpenGMOAjaxAppFF () appstate none [ ] WebBrowser.sBrowserType = BROWSER_TYPE_FIREFOX [ ] DefaultBaseState() [ ] WebBrowser.BrowserWindow.DemoApplication.Select()
[-] testcase OpenGMOAjaxAppSafari () appstate none [-] recording [ ] WebBrowser.sBrowserType = BROWSER_TYPE_SAFARI [ ] WebBrowser.sConnectionString = "host=10.0.0.1" [ ] DefaultBaseState() [ ] WebBrowser.BrowserWindow.DemoApplication.Select()