Revisión | 311 (tree) |
---|---|
Tiempo | 2009-02-25 10:20:52 |
Autor | ![]() |
ConfirmDialog対応に必要なExtension。
@@ -0,0 +1,18 @@ | ||
1 | +package watij.runtime.ie; | |
2 | + | |
3 | +import watij.dialogs.ConfirmDialog; | |
4 | + | |
5 | +public class IE2 extends IE { | |
6 | + | |
7 | + @Override | |
8 | + public ConfirmDialog confirmDialog() throws Exception { | |
9 | + bringToFront(); | |
10 | + ConfirmDialog dialog = IEConfirmDialogJP.findConfirmDialog(this); | |
11 | + if (dialog.exists()) { | |
12 | + return dialog; | |
13 | + } else { | |
14 | + return super.confirmDialog(); | |
15 | + } | |
16 | + } | |
17 | + | |
18 | +} |
@@ -0,0 +1,24 @@ | ||
1 | +package watij.runtime.ie; | |
2 | + | |
3 | +import watij.dialogs.ConfirmDialog; | |
4 | + | |
5 | +import com.jniwrapper.win32.ui.Wnd; | |
6 | + | |
7 | +public class IEConfirmDialogJP extends IEConfirmDialog { | |
8 | + | |
9 | + public IEConfirmDialogJP(Wnd dialog, IE ie) { | |
10 | + super(dialog, ie); | |
11 | + } | |
12 | + | |
13 | + public static ConfirmDialog findConfirmDialog(IE ie) throws Exception { | |
14 | + Wnd wnd = IEUtil.waitDialogWnd(IE.TITLE); | |
15 | + return new IEConfirmDialogJP(wnd, ie); | |
16 | + } | |
17 | + | |
18 | + @Override | |
19 | + public void cancel() throws Exception { | |
20 | + Wnd wnd = IEUtil.waitDialogWnd(dialog, "Button", "キャンセル"); | |
21 | + IEUtil.clickWindowUntilGone(wnd, dialog); | |
22 | + } | |
23 | + | |
24 | +} |