← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #225957]: DropDown Values not Selected Exactly

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
If you are sure, the images are correct and good (little background,
...), then the only reason for a false positive (especially Angola <>
Cambodia) is the fact, that the right entry is not visible at this
moment (both are near the beginning of the list), so one with a lower
similarity score is chosen.

On top I recommend to use 
Pattern(img).similar(0.95) or even Pattern(img).similar(0.99) instead of only the image, to be sure, a find always uses the right one or fails with a FindFailed exception otherwise. 

BTW:
Such drop down lists usually allow to select an entry, by simply typing the entry text:
click(drop_down) # opens list
type("Austria"+Key.ENTER)

should select the country Austria.

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