public void DialogWatcherOfIEAndHTMLDialogShouldNotBeNull() { using (var ie = new IE(MainURI)) { Assert.IsNotNull(ie.DialogWatcher, "ie.DialogWatcher should not be null"); ie.Button("modalid").ClickNoWait(); using (var htmlDialog = ie.HtmlDialog(Find.ByTitle("PopUpTest"))) { Assert.IsNotNull(htmlDialog.DialogWatcher, "htmlDialog.DialogWatcher should not be null"); } } }
public void DocumentShouldBeDisposedSoHTMLDialogGetsDisposedAndReferenceCountIsOK() { DialogWatcher dialogWatcher; int ReferenceCount; using (var ie = new IE(MainURI)) { ReferenceCount = ie.DialogWatcher.ReferenceCount; ie.Button("popupid").Click(); using (Document document = ie.HtmlDialog(Find.ByIndex(0))) { Assert.AreEqual(ReferenceCount + 1, ie.DialogWatcher.ReferenceCount, "DialogWatcher reference count"); } dialogWatcher = ie.DialogWatcher; } Assert.AreEqual(ReferenceCount - 1, dialogWatcher.ReferenceCount, "DialogWatcher reference count should be zero after test"); }
public void DocumentShouldBeDisposedSoHTMLDialogGetsDisposedAndReferenceCountIsOK() { DialogWatcher dialogWatcher; int ReferenceCount; using (var ie = new IE(MainURI)) { ReferenceCount = ie.DialogWatcher.ReferenceCount; ie.Button("popupid").Click(); Thread.Sleep(100); using (Document document = ie.HtmlDialog(Find.ByIndex(0))) { Assert.AreEqual(ReferenceCount + 1, ie.DialogWatcher.ReferenceCount, "DialogWatcher reference count"); } dialogWatcher = ie.DialogWatcher; } Assert.AreEqual(ReferenceCount - 1, dialogWatcher.ReferenceCount, "DialogWatcher reference count should be zero after test"); }
public void DialogWatcherOfIEAndHTMLDialogShouldNotBeNull() { using (var ie = new IE(MainURI)) { Assert.IsNotNull(ie.DialogWatcher, "ie.DialogWatcher should not be null"); ie.Button("modalid").ClickNoWait(); using (var htmlDialog = ie.HtmlDialog(Find.ByTitle("PopUpTest"))) { Assert.IsNotNull(htmlDialog.DialogWatcher, "htmlDialog.DialogWatcher should not be null"); } } }