// Create object of the Select class Select se = new Select(driver.findElement(By.xpath("//*[@id='oldSelectMenu']"))); // Select the option with value "6" se.selectByValue("6");