What\'s the correct XPath syntax to check if an option element is currently selected, or just to get the selected option
option
I would try //option[@selected='true']
//option[@selected='true']
i.e. driver.findElements(By.xpath("//option[@selected='true']")).getText();
driver.findElements(By.xpath("//option[@selected='true']")).getText();