getpropertyvalue

How to get child property value of a element property using selenium webdriver, NUnit and C#

社会主义新天地 提交于 2020-04-16 04:59:23
问题 I am testing websites using selenium webdriver and I am having difficulties getting the value of a property that is a child of another property. For me, this 2nd/child level is always coming back as null. When trying to get a value of an upper level attribute/property it is working fine with the following code: return Element1.GetAttribute("baseURI"); return Element2.GetAttribute("innerText"); Those above return the text/string that I am expecting. However if I try and get the value of a

How to get child property value of a element property using selenium webdriver, NUnit and C#

蹲街弑〆低调 提交于 2020-04-16 04:58:39
问题 I am testing websites using selenium webdriver and I am having difficulties getting the value of a property that is a child of another property. For me, this 2nd/child level is always coming back as null. When trying to get a value of an upper level attribute/property it is working fine with the following code: return Element1.GetAttribute("baseURI"); return Element2.GetAttribute("innerText"); Those above return the text/string that I am expecting. However if I try and get the value of a