← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #180251]: How to find records in a field having scroll bar?

 

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

Matt Pappas proposed the following answer:
I've used the simple convention below with some success.  In my case,
I'm trying to find an item in a drop down list whose position can vary.
I first click on the drop down box to open it.  The script then looks
for object.png, and if it doesn't find it, it keeps typing the down key
until it does.  The objects that the script is inspecting are quite
similar (i.e. History TY, History LY, History LLY, etc.) so I had to
increase the similarity degree to .80 or so.

click(object.png)
while not exists(object.png):
    type(Key.DOWN)

    if exists(object.png):
        click(object.png)
        type(Key.ENTER)

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