← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #150882]: Determine if data is entered in fields

 

Question #150882 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/150882

    Status: Open => Answered

RaiMan proposed the following answer:
no exists() command. make your own def():

def txtCompare(txt):
   type('a', KEY_CTRL)
   type('c', KEY_CTRL)
   return txt == Env.getClipboard()

-- usage
# position on the text field
if not txtCompare("should read"): print "we have troubles"; exit()

Hope it helps.

You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.