New question #222884 on Sikuli:
https://answers.launchpad.net/sikuli/+question/222884
I would like to write the following test:
If a password field is already filled, then Sikuli shouldn't enter a password.
If the password field is empty then Sikuli should eneter the password. Problem
is that Sikuli doesn't recognize whether the password entered or not.
passwordregion = r.find("PasswordRegion.png")
if
passwordregion.exists(Pattern("EmptyField.png").similar(0.90).targetOffset(-61,0)):
passwordregion.click(Pattern("EmptyField.png").similar(0.90))
passwordregion.type("Password1")
elif
passwordregion.exists(Pattern("FilledField.png").similar(0.90).targetOffset(-61,0)):
print("password was already entered")
else:
print("something is wrong")
In case of username field this code works properly. How can I define difference
between empty and filled fields?
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp