I am trying to verify a validation, can be seen here https://groups.google.com/forum/#!topic/webdriver/sUy6IKpQsHw, this link is not mine but I want to verify this text Please fill out this field.
, or any other better idea ? how to verify it
What I did is as below:
msg = self.driver.find_element_by_id("username")
print(msg.get_attribute("value"))
time.sleep(10)
assert msg.get_attribute("value") == "Please fill out this field."
Print has given following output > print(msg.get_attribute("value"))
and assert has given AssertionError
, I have been through many answers non helped me
HTML:
<input name= "username" id="username" required>
I tried [print(msg.get_attribute("value").values)
to see whats there and it has given following error AttributeError: 'unicode' object has no attribute 'values'