sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #29860
Re: [Question #259792]: How to clear the text in the text box before entering a new one?
Question #259792 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/259792
Status: Open => Answered
RaiMan proposed the following answer:
This works on this page with an comment field visible in edit mode
switchApp("safari") # I am on Mac currently
m = find("Message.png")
# the image of the above word Message:
# initial fill
click(m.below(20)) # activate the text field
type("a", Key.CMD) # select all
type("some text") # overwrite existing content
# loop 3 times and fill
for n in range(3):
wait(2)
click(m.below(20))
type("a", Key.CMD)
type("some text %d" % (n))
wait(3)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.