use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method testGetDropdownByTextRO.
@Test(expected = SystemException.class)
public void testGetDropdownByTextRO() {
SeleniumWMultiDropdownWebElement component = getByLabel(WMultiDropdownTestingExample.LABEL_RO_SOME_SELECTED);
component.getDropdown(WMultiDropdownTestingExample.DATA_SOME_SELECTED.get(0));
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method getDropdownsHelper.
/**
* Helper for getDropdowns tests.
* @param component the conponent to test
* @param expected the List of expected selected options.
*/
private void getDropdownsHelper(final SeleniumWMultiDropdownWebElement component, final List expected) {
List<WebElement> dropdowns = component.getDropdowns();
Assert.assertEquals(expected.size(), dropdowns.size());
Select se;
for (WebElement dropdown : dropdowns) {
se = new Select(dropdown);
Assert.assertTrue(expected.contains(se.getFirstSelectedOption().getText()));
}
}
use of com.github.bordertech.wcomponents.test.selenium.element.SeleniumWMultiDropdownWebElement in project wcomponents by BorderTech.
the class WMultiDropdownTestingExample_Test method testDeselectReadOnly.
@Test(expected = SystemException.class)
public void testDeselectReadOnly() {
SeleniumWMultiDropdownWebElement component = getByLabel(WMultiDropdownTestingExample.LABEL_RO_ALL_SELECTED);
String text = WMultiDropdownTestingExample.DATA_LIST.get(1);
component.deselect(text);
}
Aggregations