sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #42296
Re: [Question #617173]: Need to click a checkbox against select text, where text is changing frequently
Question #617173 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/617173
Status: Open => Answered
dinev proposed the following answer:
You can find all checkboxes and sort them by Y coordinate. Then get last
one. Here is sample function:
###
def Get_Nth_Image_Ysort(img,n):
TestLog("Look Y sorted elements like " + str(img) + " and take number " + str(n))
res=findAll(img)
sorted_img = sorted(res, key=lambda m:m.y)
sorted_img[n-1].highlight(2)
return sorted_img[n-1]
###
You can enhance above function to look in region or to look checkbox by
X or by X,Y
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.