There is a dropdown menu of states on this website (see link below). This is the toughest one I have had to do. Can anyone help me figure out how to select an item from this menu? The problem is that the DOM doesn't change when the list gets populated and so I don't know how to select it.
US Post Office Address Search Page
@FindBy(css = "span.select-current-text") private WebElement state;
public void selectElementByString(WebElement field, String str ) {
state.click();
// menu appears but doesn't appear in HTML so how do I select?
}
This is how Selenium IDE recorded it:
selenium.click("css=span.select-current-text");
selenium.click("link=RI - Rhode Island");
I suspect the control is created with DOJO Toolkit as seen here .