Hi,

Is there a way to go to the newly-opened window, provided that the
window has no name/title?

There are two methods in WebTestCase class that might provide this
functionality: i) gotoWindow and ii) gotoWindowByTitle. However,
please correct me if I am wrong, these two methods requires that the
window of interest has a name or title.

The way I am doing right now is:
---start---
HttpUnitDialog dialog = (HttpUnitDialog) getDialog();
WebWindow[] windows = dialog.getWebClient().getOpenWindows();
assertEquals("2 windows must be opened at this point", 2, windows.length);
WebWindow window = windows[1];
---end---

Thank you.


Buhi Mume


_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to