or
nipTextBox.MouseClick();
browser.Desktop.KeyBoard.TypeText(nip);
browser.RefreshDomTree();
var ul = browser.Find.jQuery().classes("ui-autocomplete").last<HtmlUnorderedList>();
var a = ul.AllItems.First().Find.jQuery().child().first<HtmlAnchor>();
a.MouseClick();
Unfortunatle autocomplete menu doesn't appear.
browser.NavigateTo(
"http://example.com"
);
// Do some simple interaction with the page,
// e.g. using textboxes and buttons to log into the website
// [code omitted]
// Problem occurs here:
// WITHOUT this Sleep statement, the following .Click() is executed correctly.
// WITH this Sleep statement, the .Click() ends up on the wrong DOM element
Thread.Sleep(4000);
var link = browser.Find.ByExpression<HtmlAnchor>(
"href=some-href-value-in-the-page"
);
link.Click();
Hi, I am using upload file dialog to upload files. the upload file dialogs exist in multiple pages. when the dialgo opens, however, sometimes it uses the previous file path from UI. do I do anything wrong? I have debugged and the filePath is correct but from UI I can see the actual file path entered in the dialog is from previous page's upload file dialog. I am using IE8. Thanks!
FileUploadDialog
uploadDialog = new FileUploadDialog(manager.ActiveBrowser, filePath, dismissButton, dialogTitle);
manager.DialogMonitor.AddDialog(uploadDialog);
manager.DialogMonitor.Start();
browsebutton.Click();
uploadDialog.WaitUntilHandled(5000);
manager.DialogMonitor.Stop();
manager.DialogMonitor.RemoveDialog(uploadDialog);
Console.WriteLine(Manager.ActiveBrowser.Find.ById<HtmlTable>(
"assessmentForm:permitsTable"
).InnerText);
Manager.ActiveBrowser.Find.ByContent<HtmlTable>(
"l:Permit"
, FindContentType.InnerText).IsVisible();