Could you please give me some hint?
- Code: Select all
public void eraseField(String fieldName, int x, int y) throws Exception {
final Text fieldNameField = (Text)ui.click(fieldName, x, y);
ui.getDisplay().syncExec(new Runnable() {
public void run() {
totCars = fieldNameField.getText().length();
}
});
eraseField(totCars);
}
public void eraseField(int totCars) throws Exception {
for (int i = 0; i < totCars; i++) {
ui.keyClick(SWT.DEL);
}
}
//EXAMPLE OF USE:
protected void registerWidgetInfo() {
ui.register("Conexion", new LabeledLocator(Text.class, "Conexion :"));
}
public void testMain() throws Exception {
particular.eraseField("Conexion", 2, 7);
}