JavaScript
"Denicker Chou" <[email protected]>
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <7A1E1791F165C14FAC6B75CAB339FF3E2AFCD1@mercury.atreus-systems.com> |
Hi there,
Could anyone show me how to pick up acceptance of a confirmation dialog which is invoked by calling JavaScript method, confirm()? Specifically, I select an item from a page, then click on delete button on that page. Now a confirmation dialog shows up. I must click on OK button to confirm this delete action, then deletion happens. My problem is that I cannot make the deletion happen by doing the following:
DialogAdapter da = new DialogAdapter();
wc.setDialogResponder(da);
assertTrue(da != null);
delb.click();
da.getConfirmation("Are you sure you want to permanently delete the selected item(s)?");
Here, wc is an object of WebConversation and delb is an object of delete button.
Thanks,
Denny