sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11880
Re: [Question #203478]: how to verify special character are present or not
Question #203478 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/203478
Status: Open => Answered
RaiMan proposed the following answer:
Ok, understood - no will not work ;-)
type("c", KeyModifier.CTRL)
x = Env.getClipboard()
print "from Clipboard:", x # now x should contain, what you have "read" from the file
# after opening any search engine :
# --- how do you do that?
type("v", KeyModifier.CTRL)
type(Key.ENTER)
# now the value should be pasted into the entry field
If you now want to test, wether the value has really been pasted, you have to again get it back to the clipboard
type("a", KeyModifier.CTRL) # select all
type("c", KeyModifier.CTRL)
xPasted = Env.getClipboard()
# now you can compare
if x == xPasted: print "Oh yes it pasted well"
else: print "Something went wrong"
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.