ISeleniumGetSelectedId Method WebDriver
Gets option element ID for selected option in the specified select element.

Namespace: Selenium
Assembly: ThoughtWorks.Selenium.Core (in ThoughtWorks.Selenium.Core.dll) Version: 3.1.0
Syntax

string GetSelectedId(
	string selectLocator
)

Parameters

selectLocator
Type: SystemString
an element locator identifying a drop-down menu

Return Value

Type: String
the selected option ID in the specified select drop-down
See Also

Reference