How to select a value from drop How to select multiple values in a drop down How to select all values in drop down
Anonymous
check is the dd is multi selectable - if(select.isMultiple()) { //select.selectByValue("Jan"); //select.selectByValue("Feb"); } ---------------------- List options = select.getOptions();//gets all options for(WebElement el : options){ String temp = el.getText(); select.SelectByVisibleText(temp); } ----------------------------------- List options =select.getAllSelectedOptions() for (WebElement option : options) { System.out.println(option.getText()); -------- dropdown.deselectAll();
Check out your Company Bowl for anonymous work chats.