<Select> Tag is not working for selecting value in dropdown <Select> Tag is not working for selecting value in dropdown selenium selenium

<Select> Tag is not working for selecting value in dropdown


Your drop down is a simulated drop down by css, not a HTML native drop down: Select. So you can not operate it as native drop down.

After look into the HTML code of your dropdown, there is an embed native drop down, but it's always invisible no matter you expand options or not. Selenium can't operate on invisible element(But you can read value/attribute from it), that's why the exception you met.

Actually all options come from the div class="menu", so you should click the option from div class="menu" as below screenshot show:

enter image description here

Code to resolve your problem:

// click arrow down to expand optionsdriver.findElement(By.cssSelector("select[name='skills'] + i")).click();// choose option: Angulardriver.findElement(By.xpath("//div[contains(@class, 'multiple')][select[@name='skills']]//div[.='Angular']"));