josette_merhy12
11 years agoOccasional Contributor
Switching Browsers
hi, i m trying to run the same jscript function on firefox and chrome. i m setting the variable browser = Sys.Browser() the first time i call this function, chrome was opened, so the system brow...
- 11 years agoInstead of Sys.Browser() use Sys.Browser("nameOfYourBrowser").
What I do is, I have a project variable browser and whenever I need to change browsers I do:
function setBrowser(browser)
{
Project.Variables.browser = browser
}
function useDiffentBrowsers()
{
setBrowser("firefox")
Sys.Browser(Project.Variables.browser).Page.Find(something).Click()
setBrowser("chrome")
Sys.Browser(Project.Variables.browser).Page.Find(something).Click()
}