premanand_r
11 years agoOccasional Contributor
Cannot able to do cross browser testing
we recorded a page in our application in IE and we get the script as : Call Aliases.browser.ToUrl("http://example.abc.com/") Call Aliases.browser.pageTips.formFrmlogin.table.textboxTxtem...
- 11 years agoYour code should look like this:
Browsers.Item(btFirefox).Run("http://example.abc.com");
Sys.Browser().Page("http://example.abc.com/").Panel("container").Form("frmLogin").Panel("rt_content").Panel("login").Table(0).Cell(5, 1).ImageButton("imgbtnLogin").Click();
The only thing you should change to test in another browser is replace "btFirefox" to "btIExplorer" or "btChrome".
When you use Browsers.Item(...).Run or Browsers.Item(...).Navigate TestComplete sets specified browser as Browsers.CurrentBrowser and uses it as default when calling Sys.Browser() without parameters.