sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #24379
Re: [Question #244334]: How to catch a text generated in dropdown list
Question #244334 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/244334
Eugene S proposed the following answer:
So again, as I said, you can create a pattern from the first (generated) id and then use it to find the second one on the screen.
For example:
# locate the generated id on the screen and create a pattern
generatedID = capture(generatedIDregion)
generatedIDPattern = Pattern(generatedID)
"""
Some code to open the dropdown menu
"""
# once the dropdown menu is showing, search for the same pattern we created earlier
try:
dropDownID = find(generatedIDPattern)
dropDownID.highlight(1)
Otherwise, copy the generated ID and keep in a variable and then use OCR
to read the dropdown id. Then compare it.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.