Handling dropdown list in a webpage

Asked by Venkata Sandeepu Lade

Hi,
I want to handle the below scenario using Sikuli. Could you please suggest me what is the best I can do with sikuli on this?

I want to take input as "X" and want to search for "X" in a drop down list.
Please suggest

Thanks
Sandeep

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Clearly said:
--- if it is a web app, use Selenium
--- if it is a normal desktop app, you will only have a chance, if you either know the content of the dropdownlist as a list of strings or you get Sikuli's Region.text() running (chances are rather low :-(

--1. list of strings
content and sequence are the same as in the drop down list on the screen:
- search for the entry in the list and get the index
- click the drop down open and key down to the entry using the index

--2. OCR-read the opened drop down
- create a list of strings representing the drop down
- go on as in 1.

Revision history for this message
RaiMan (raimund-hocke) said :
#2

Sorry, too fast ;-) it is a webpage.

If you do not want to use Selenium and it is a html drop down, it might be the easiest way, to read the page source to get the content of the list (Python module urllib).

Revision history for this message
Jack Cushman (jcushman) said :
#3

Most dropdown lists (web or desktop) will select an item if you type the item while the list has focus. So you select the dropdown with type(Key.TAB) or click(), and then type() or paste() the string you're trying to find.

For accessibility, most interfaces are designed to be navigated with just the keyboard, and that can be a good fast way to navigate with Sikuli.

Can you help with this problem?

Provide an answer of your own, or ask Venkata Sandeepu Lade for more information if necessary.

To post a message you must log in.