Author: rhopp
Date: 2012-06-07 11:43:16 -0400 (Thu, 07 Jun 2012)
New Revision: 41776
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
Log:
Clicking to FormText in Centra has been broken. This repairs it.
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java
===================================================================
---
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java 2012-06-07
15:39:35 UTC (rev 41775)
+++
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/parts/SWTBotFormTextExt.java 2012-06-07
15:43:16 UTC (rev 41776)
@@ -2,12 +2,11 @@
import java.lang.reflect.Field;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Event;
import org.eclipse.swtbot.swt.finder.ReferenceBy;
import org.eclipse.swtbot.swt.finder.SWTBotWidget;
import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
import org.eclipse.swtbot.swt.finder.results.StringResult;
+import org.eclipse.swtbot.swt.finder.results.VoidResult;
import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl;
import org.eclipse.ui.forms.widgets.FormText;
import org.eclipse.ui.internal.forms.widgets.FormTextModel;
@@ -36,8 +35,16 @@
}
public AbstractSWTBotControl<FormText> click() {
+ syncExec(new VoidResult() {
+
+ @Override
+ public void run() {
+ click(widget.toDisplay(25,5).x, widget.toDisplay(25,5).y, true); //+20 is there
because of icon
+ }
+ });
+ /*old version of click
setFocus();
- keyboard().typeCharacter('\r');
+ keyboard().typeCharacter('\r');*/
return this;
}
Show replies by date