The web element contains apostrophe, so I do not know how to create the xpath in my selenium automation script.
The script part is
WebElement settingSection = FindElements(By.XPath(string.Format(".//*[.='{0}']", **category**))).FirstOrDefault(x => x.Displayed);
the variable category will be "Sort 'Browse Publications' filter:", but it could not work when run the automation
I tried the way with escape apostrophe, but it does not work either.
WebElement settingSection = FindElements(By.XPath(string.Format(".//*[.=\"{0}\"]", category))).FirstOrDefault(x => x.Displayed);