I want to get a particular element id by searching for a matching innerHTML string. For example I want to find the element id that has the innerHTML "Start of Car".

public static bool SelectSomething(IWebDriver driver, string searchName)
{
var js = driver as IJavaScriptExecutor;
if (js == null) return false;
var element = (string) js.ExecuteScript("...script to get the ids...");
var x = driver.FindElement(By.Id(element));
x.Click();
return true;
}
I know it is possible to loop through and find all of the innerHTML using JavaScript but how do you return the id once you find innerHTML that matches the 'searchName' string?
.Textnot work?