← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #223322]: how to highlight and delete text string in text box

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
for each text box label define a Pattern:
label1 = Pattern("image of label1.png").similar(0.95).targetOffset(50, 0)

the high similarity should avoid false positives and the targetOffset
(should point into the text field) will be used by a click action:

ref = find("some top image")
ref = ref.left(1).right(300) # the width of the region where the labels are found
region1 = ref.below() # the search region

region1.click(label1)
type("a", KeyModifier.CTRL) # to select, what's already there
paste("the new text")

same for the other fields.

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