Question: how to select dropdown in selenium using javascriptexecutor?
Answer: 1 Answer. In your first option selenium clearly saying Element should have been "select" but was "option", means here you are providing the xpath for option while expecting only xpath for select. WebElement select = driver. findElement(By.id("type")); ((JavascriptExecutor)driver).