In the given code, I need the list of the value of the \"value\" attribute for each of the options in the select drop-down :
To create a List of all the values of the value attribute for each of the options with in the <select>
tag you can use the following Java based solution:
Select dropDownSelect = new Select(driver.findElement(By.id("myselect")));
List<WebElement> dropDownActualValues = dropDownSelect.getOptions();
for(WebElement element:dropDownActualValues)
System.out.println(element.getAttribute("value"));