|
Lines 20-25
import org.eclipse.jubula.rc.common.driver.ClickOptions;
Link Here
|
| 20 |
import org.eclipse.jubula.rc.common.driver.DragAndDropHelper; |
20 |
import org.eclipse.jubula.rc.common.driver.DragAndDropHelper; |
| 21 |
import org.eclipse.jubula.rc.common.exception.StepExecutionException; |
21 |
import org.eclipse.jubula.rc.common.exception.StepExecutionException; |
| 22 |
import org.eclipse.jubula.rc.common.tester.adapter.interfaces.IListComponent; |
22 |
import org.eclipse.jubula.rc.common.tester.adapter.interfaces.IListComponent; |
|
|
23 |
import org.eclipse.jubula.rc.common.util.ArrayValidator; |
| 23 |
import org.eclipse.jubula.rc.common.util.IndexConverter; |
24 |
import org.eclipse.jubula.rc.common.util.IndexConverter; |
| 24 |
import org.eclipse.jubula.rc.common.util.ListSelectionVerifier; |
25 |
import org.eclipse.jubula.rc.common.util.ListSelectionVerifier; |
| 25 |
import org.eclipse.jubula.rc.common.util.MatchUtil; |
26 |
import org.eclipse.jubula.rc.common.util.MatchUtil; |
|
Lines 58-67
public class ListTester extends AbstractTextVerifiableTester {
Link Here
|
| 58 |
*/ |
59 |
*/ |
| 59 |
private int[] getCheckedSelectedIndices() throws StepExecutionException { |
60 |
private int[] getCheckedSelectedIndices() throws StepExecutionException { |
| 60 |
int[] selected = getListAdapter().getSelectedIndices(); |
61 |
int[] selected = getListAdapter().getSelectedIndices(); |
| 61 |
if (selected.length == 0) { |
62 |
ArrayValidator.validateSelectionArray(selected); |
| 62 |
throw new StepExecutionException("No list element selected", //$NON-NLS-1$ |
|
|
| 63 |
EventFactory.createActionError(TestErrorEvent.NO_SELECTION)); |
| 64 |
} |
| 65 |
return selected; |
63 |
return selected; |
| 66 |
} |
64 |
} |
| 67 |
|
65 |
|
|
Lines 131-140
public class ListTester extends AbstractTextVerifiableTester {
Link Here
|
| 131 |
public void rcVerifyText(String text, String operator) { |
129 |
public void rcVerifyText(String text, String operator) { |
| 132 |
String[] selected = getListAdapter().getSelectedValues(); |
130 |
String[] selected = getListAdapter().getSelectedValues(); |
| 133 |
final int selCount = selected.length; |
131 |
final int selCount = selected.length; |
| 134 |
if (selCount < 1) { |
132 |
ArrayValidator.validateSelectionArray(selected); |
| 135 |
throw new StepExecutionException("No selection", //$NON-NLS-1$ |
|
|
| 136 |
EventFactory.createActionError(TestErrorEvent.NO_SELECTION)); |
| 137 |
} |
| 138 |
for (int i = 0; i < selCount; i++) { |
133 |
for (int i = 0; i < selCount; i++) { |
| 139 |
Verifier.match(selected[i], text, operator); |
134 |
Verifier.match(selected[i], text, operator); |
| 140 |
} |
135 |
} |
|
Lines 211-221
public class ListTester extends AbstractTextVerifiableTester {
Link Here
|
| 211 |
*/ |
206 |
*/ |
| 212 |
public String rcReadValue(String variable) { |
207 |
public String rcReadValue(String variable) { |
| 213 |
String[] selected = getListAdapter().getSelectedValues(); |
208 |
String[] selected = getListAdapter().getSelectedValues(); |
| 214 |
if (selected.length > 0) { |
209 |
return (String) ArrayValidator.validateSelectionArray(selected); |
| 215 |
return selected[0]; |
|
|
| 216 |
} |
| 217 |
throw new StepExecutionException("No list item selected", //$NON-NLS-1$ |
| 218 |
EventFactory.createActionError(TestErrorEvent.NO_SELECTION)); |
| 219 |
} |
210 |
} |
| 220 |
|
211 |
|
| 221 |
/** |
212 |
/** |