Hi,
Starting with the examples supplied I made a small test, just loading a page that needs a logon, enter some text in a text box and click on a button to make a search.
It works on IE(9) and Firefox(latest) but in Chrome the logon box remains with both fields empty and the test fails with an error that it fails to find the control.
It's like it doesn't detect the logon dialog.
Thanks in advance, here is the code:
Starting with the examples supplied I made a small test, just loading a page that needs a logon, enter some text in a text box and click on a button to make a search.
It works on IE(9) and Firefox(latest) but in Chrome the logon box remains with both fields empty and the test fails with an error that it fails to find the control.
It's like it doesn't detect the logon dialog.
Thanks in advance, here is the code:
Settings mySettings =
new
Settings();
mySettings.Web.DefaultBrowser = browser;
Manager myManager =
new
Manager(mySettings);
myManager.Start();
myManager.LaunchNewBrowser();
myManager.DialogMonitor.AddDialog(LogonDialog.CreateLogonDialog(myManager.ActiveBrowser,
"username"
,
"password"
, DialogButton.OK));
myManager.DialogMonitor.Start();
myManager.ActiveBrowser.NavigateTo(
"url"
);
Element linkSearch = myManager.ActiveBrowser.Find.ByContent(
"Search"
);
myManager.ActiveBrowser.Actions.Click(linkSearch);
Element editSearch = myManager.ActiveBrowser.Find.ById(
"ctl00_ctl00_ContentPlaceHolderMain_txtSearch"
);
myManager.ActiveBrowser.Actions.SetText(editSearch,
"Example"
);
Element radioCompanies = myManager.ActiveBrowser.Find.ById(
"ctl00_ctl00_ContentPlaceHolderMain_rbtnListFilterType_0"
);
myManager.ActiveBrowser.Actions.Check(radioCompanies,
true
);
Element buttonSearch = myManager.ActiveBrowser.Find.ById(
"ctl00_ctl00_ContentPlaceHolderMain__btnSearch"
);
myManager.ActiveBrowser.Actions.Click(buttonSearch);
Element linkResult = myManager.ActiveBrowser.Find.ByContent(
"Example"
);
myManager.ActiveBrowser.Actions.Click(linkResult);
myManager.Dispose();