public void ThenIChooseTheLanguage(string lang) { log.Info("I clicked on the: " + lang); string xpath = "//div//strong[contains(.,'" + lang + "')]/../.."; var element = driver.FindElement(By.XPath(xpath)); true.Equals(driver.FindElement(By.XPath(xpath)).Displayed); comSteps.ScrollToTheElement(element, driver); element.Click(); }