I want to select a value from a drop down using selenium.
the value is "Other" See PIC
The xpath for the dropdown is: //nz-select[@formcontrolname='selectedIntegrationTypes']
This is my Code:
public static void selectDropDownByXpath()
{
WebDriver driver2 = WebDriverMgr.getDriver();
Select dropDown = new Select(driver2.findElement(By.xpath("//nz-select[@formcontrolname='selectedIntegrationTypes']")));
dropDown.selectByVisibleText("Other");
}
And I get this error message:
org.openqa.selenium.support.ui.UnexpectedTagNameException: Element should have been "select" but was "nz-select"
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'PC', ip: '12.35.12.65', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_65'
Driver info: driver.version: unknown
Can someone please advise how can I select the value from the drop down? regards