When running the Element.GetAttribute(), I am getting a null value back whether the value is true or false. The expected behavior according to Selenium is null for false and "true" for true. Has anyone seen this before? I am looking up the isContentEditable property with Chrome and it is showing false, which returns null. I then try something that should be true like "translate" or "spellcheck", and those also return null. Is it possible that this must be set by the developer in the outer HTML?
string returnValue = _driver.FindElement(By.XPath(elementXPath)).GetAttribute("spellcheck");
if (returnValue == null) {
MessageBox.Show("I'm null", "Disturbing Prompt");
Getting other attributes in this way works great, such as "offsetHeight" will return 32.
Thanks for looking.