This is a migrated thread and some comments may be shown as answers.

Browser compatibility issue while connecting to new browser using WebAii

1 Answer 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Hemashree
Top achievements
Rank 1
Hemashree asked on 28 Dec 2011, 02:17 PM
Hi,

Below WebAii code works in IE but not in Firefox and chrome.This code is used to wait for the new child window to connect from the existing parent window by comparing the URL passed as the parameter:

Manager.WaitForNewBrowserConnect(addItemWindowurl, true, 30000);

Please suggest us the alternative to resolve this problem in Firefox and Chrome.

Thanks and Regards,
Hemashree

1 Answer, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 28 Dec 2011, 03:51 PM
Hello Hemashree,

I suspect you do not have a line that turns on New Browser Tracking. Without this line, IE can still connect to popups, but FF and Chrome cannot. See below for complete sample code against a public site with a popup child window:

Manager.LaunchNewBrowser(BrowserType.Chrome);
 
//Turn on new browser tracking before the popup link is clicked
Manager.SetNewBrowserTracking(true);
 
Find.ByTagIndex<HtmlAnchor>("a", 58).Click();
Manager.WaitForNewBrowserConnect("http://www.htmlcodetutorial.com/linking/popup_test_a.html", true, 3000);
 
//You can now turn off new browser tracking
Manager.SetNewBrowserTracking(false);
 
Assert.IsTrue(Manager.Browsers.Count == 2);
Assert.IsTrue(ActiveBrowser.Url.Contains("http://www.htmlcodetutorial.com/linking/popup_test_a.html"));
 
ActiveBrowser.Close();
 
Assert.IsTrue(Manager.Browsers.Count == 1);
Assert.IsTrue(ActiveBrowser.Url.Contains("http://www.htmlcodetutorial.com/linking/linking_famsupp_70.html"));

Kind regards,
Anthony
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Hemashree
Top achievements
Rank 1
Answers by
Anthony
Telerik team
Share this question
or