private IWebElement GetWebElement(IWebDriver driver, KeyValuePairString keyValuePair) { // bug: checkbox found but not checked when clicking div // string xpath = $"//*/text()[contains(.,'{keyValuePair.Key}')]/following::div[contains(.,'{keyValuePair.Value}') and not(div)]"; // workaround string xpath = $"//*/text()[contains(.,'{keyValuePair.Key}')]/following::span[contains(.,'{keyValuePair.Value}') and not(span)]"; IWebElement check = driver.FindElement(By.XPath(xpath)); return(check); }
/// <summary> /// Constructor /// </summary> public ConnectionStringSafe(KeyValuePairString item) : this(item.Key, item.Value) { }
/// <summary> /// Constructor /// </summary> public AppSettingSafe(KeyValuePairString item) : base(item.Key, item.Value) { }