Scenario: On clicking reset button value should disappear and the field that holds the value should reset to blank. Approach: My approach is to get text or innerHtml from id =mapPropertyHighlighted and make sure it is empty. Challenge: How do I make sure text from id should be blank? How to add assertion because get text() is returning blank if an element has no value and not sure how to add assertion for blank value? Is there any other way to verify value/text returned should be none/blank?
I think in Python you can check for
"" on Empty string
self.assertEqual(element.text, None) self.assertEqual(element.text, "") self.assertEqual(len(element.text), 0)
Also check this question for other options: https://stackoverflow.com/questions/9573244/how-to-check-if-the-string-is-empty