WebElement select = myD.findElement(By.xpath(\"//*[@id=\'custfoodtable\']/tbody/tr[2]/td/div/select\"));
List allOptions = select.findElements(By.t
You can do it like this:
String[] act = new String[allOptions.length];
int i = 0;
for (WebElement option : allOptions) {
act[i++] = option.getValue();
}
List expected = Arrays.asList(exp);
List actual = Arrays.asList(act);
Assert.assertNotNull(expected);
Assert.assertNotNull(actual);
Assert.assertTrue(expected.containsAll(actual));
Assert.assertTrue(expected.size() == actual.size());