I am trying to open a new window by clicking on a hyperlink but the code always fails at Waitfornewbrowerconnect(URL,Ispartial, Timeout). I mean it always times out. There are two pieces of code given below both gets stuck at Waitfornewbrowerconnect(URL,Ispartial, Timeout) in both IE or FF. I am using following configurations:
- MS Visual studio express edition 2010
- Gallio 3.2
-Windows 7
My browser settings are exactly as given in the documentation. Any ideas?
Code 1
*****************************************************************************************************************
Manager.Settings.AnnotateExecution = true;
Manager.LaunchNewBrowser(BrowserType.InternetExplorer,true);
Manager.DialogMonitor.AddDialog(new LogonDialog(ActiveBrowser, "login", "password", DialogButton.OK));
Manager.DialogMonitor.Start();
ActiveBrowser.NavigateTo("http://localhost:4444/Location/NewForm.aspx?RootFolder=%2FLocation&Source=http%3A%2F%2Ftest.kuoni.com%2FLocation%2FAllItems.aspx");
ActiveBrowser.WaitUntilReady();
Manager.SetNewBrowserTracking(true);
Find.ById<HtmlAnchor>("ID").Click();
if (ActiveBrowser.BrowserType == BrowserType.InternetExplorer)
{
InternetExplorerActions ieActions = (InternetExplorerActions)ActiveBrowser.Actions;
ieActions.ConnectIEDialog("l:Edit Hyperlink Properties", 300);
Manager.WaitForNewBrowserConnect("http:/localhost:4444/_layouts/AssetEditHyperLink.aspx?DefaultAssetLocation=&DefaultAssetImageLocation=&DisplayLookInSection=true&DefaultToLastUsedLocation=true&ManageHyperlink=true&DisplayWidth=&DisplayHeight=&AllowExternalUrls=true&OverrideDialogImageUrl=&OverrideDialogTitle=&ManageLinkDisplayText=true&ManageLinkIcon=true&IconUrl=", false, 3000);
Assert.IsTrue(ActiveBrowser.IsIEDialog);
ActiveBrowser.Close();
}
Manager.WaitForNewBrowserConnect("http://localhost:4444/_layouts/AssetEditHyperLink.aspx?DefaultAssetLocation=&DefaultAssetImageLocation=&DisplayLookInSection=true&DefaultToLastUsedLocation=true&ManageHyperlink=true&DisplayWidth=&DisplayHeight=&AllowExternalUrls=true&OverrideDialogImageUrl=&OverrideDialogTitle=&ManageLinkDisplayText=true&ManageLinkIcon=true&IconUrl=", false, 3000);
Assert.AreEqual("Edit Hyperlink Properties", ActiveBrowser.PageTitle);
ActiveBrowser.Close();
******************************************
Code 2
*****************************************************************************************************
Manager.Settings.AnnotateExecution = true;
Manager.LaunchNewBrowser(BrowserType.InternetExplorer,true);
Manager.DialogMonitor.AddDialog(new LogonDialog(ActiveBrowser, "login", "password", DialogButton.OK));
Manager.DialogMonitor.Start();
ActiveBrowser.NavigateTo("http://localhost:4444/Location/NewForm.aspx?RootFolder=%2FLocation&Source=http%3A%2F%2Ftest.kuoni.com%2FLocation%2FAllItems.aspx");
ActiveBrowser.WaitUntilReady();
Manager.SetNewBrowserTracking(true);
Find.ById<HtmlAnchor>("ID").Click();
Manager.WaitForNewBrowserConnect("http://localhost:4444/_layouts/AssetEditHyperLink.aspx?DefaultAssetLocation=&DefaultAssetImageLocation=&DisplayLookInSection=true&DefaultToLastUsedLocation=true&ManageHyperlink=true&DisplayWidth=&DisplayHeight=&AllowExternalUrls=true&OverrideDialogImageUrl=&OverrideDialogTitle=&ManageLinkDisplayText=true&ManageLinkIcon=true&IconUrl=", false, 3000);
Assert.AreEqual("Edit Hyperlink Properties", ActiveBrowser.PageTitle);
ActiveBrowser.Close();
- MS Visual studio express edition 2010
- Gallio 3.2
-Windows 7
My browser settings are exactly as given in the documentation. Any ideas?
Code 1
*****************************************************************************************************************
Manager.Settings.AnnotateExecution = true;
Manager.LaunchNewBrowser(BrowserType.InternetExplorer,true);
Manager.DialogMonitor.AddDialog(new LogonDialog(ActiveBrowser, "login", "password", DialogButton.OK));
Manager.DialogMonitor.Start();
ActiveBrowser.NavigateTo("http://localhost:4444/Location/NewForm.aspx?RootFolder=%2FLocation&Source=http%3A%2F%2Ftest.kuoni.com%2FLocation%2FAllItems.aspx");
ActiveBrowser.WaitUntilReady();
Manager.SetNewBrowserTracking(true);
Find.ById<HtmlAnchor>("ID").Click();
if (ActiveBrowser.BrowserType == BrowserType.InternetExplorer)
{
InternetExplorerActions ieActions = (InternetExplorerActions)ActiveBrowser.Actions;
ieActions.ConnectIEDialog("l:Edit Hyperlink Properties", 300);
Manager.WaitForNewBrowserConnect("http:/localhost:4444/_layouts/AssetEditHyperLink.aspx?DefaultAssetLocation=&DefaultAssetImageLocation=&DisplayLookInSection=true&DefaultToLastUsedLocation=true&ManageHyperlink=true&DisplayWidth=&DisplayHeight=&AllowExternalUrls=true&OverrideDialogImageUrl=&OverrideDialogTitle=&ManageLinkDisplayText=true&ManageLinkIcon=true&IconUrl=", false, 3000);
Assert.IsTrue(ActiveBrowser.IsIEDialog);
ActiveBrowser.Close();
}
Manager.WaitForNewBrowserConnect("http://localhost:4444/_layouts/AssetEditHyperLink.aspx?DefaultAssetLocation=&DefaultAssetImageLocation=&DisplayLookInSection=true&DefaultToLastUsedLocation=true&ManageHyperlink=true&DisplayWidth=&DisplayHeight=&AllowExternalUrls=true&OverrideDialogImageUrl=&OverrideDialogTitle=&ManageLinkDisplayText=true&ManageLinkIcon=true&IconUrl=", false, 3000);
Assert.AreEqual("Edit Hyperlink Properties", ActiveBrowser.PageTitle);
ActiveBrowser.Close();
******************************************
Code 2
*****************************************************************************************************
Manager.Settings.AnnotateExecution = true;
Manager.LaunchNewBrowser(BrowserType.InternetExplorer,true);
Manager.DialogMonitor.AddDialog(new LogonDialog(ActiveBrowser, "login", "password", DialogButton.OK));
Manager.DialogMonitor.Start();
ActiveBrowser.NavigateTo("http://localhost:4444/Location/NewForm.aspx?RootFolder=%2FLocation&Source=http%3A%2F%2Ftest.kuoni.com%2FLocation%2FAllItems.aspx");
ActiveBrowser.WaitUntilReady();
Manager.SetNewBrowserTracking(true);
Find.ById<HtmlAnchor>("ID").Click();
Manager.WaitForNewBrowserConnect("http://localhost:4444/_layouts/AssetEditHyperLink.aspx?DefaultAssetLocation=&DefaultAssetImageLocation=&DisplayLookInSection=true&DefaultToLastUsedLocation=true&ManageHyperlink=true&DisplayWidth=&DisplayHeight=&AllowExternalUrls=true&OverrideDialogImageUrl=&OverrideDialogTitle=&ManageLinkDisplayText=true&ManageLinkIcon=true&IconUrl=", false, 3000);
Assert.AreEqual("Edit Hyperlink Properties", ActiveBrowser.PageTitle);
ActiveBrowser.Close();