Problem Description
There are two input boxes, the user name and password input box
- Call set_text method, enter your user name
- Call set_text method again, enter the password
- After emptying the contents of a user name input box, the content will once again enter the rollback last two strings
Offending code
def set_text(self, loc, value, is_clear=False):
element = self.find_element(*loc)
if is_clear:
element.clear()
element.send_keys(value)
else:
element.send_keys(value)
Solution:
In elsef add the following code in the branch, the problem is solved
element.clcik()
element.send_keys(value)