IWebDriver driver; IJavaScriptExecutor js = (IJavaScriptExecutor)driver; string title = (string)js.ExecuteScript("return document.title");