I'm trying to select an option from dropdown with one option using the below code; but I'm getting an error message that reads "Element should have been "select" but was "li"
CODE:
WebElement ERA = driver.findElement(By.id("Menu_8990"));
Select dropdown = new Select(ERA);
dropdown.selectByVisibleText("ERA Registration");
HTML:
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="true"><span class=""></span> ERA <span class="caret"></span></a>
<a href="javascript:void(0)" onclick="submitting_upload_main('172.17.8.53/ERA/registration_uploaded');">ERA Registration</a>