← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #231040]: input combobox instead of textbox?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Sorry currently not, but you can do this in Sikuli by stepping down to
the Java level and make a def(), that implements the wanted feature.

If you do not want to do that on your own, you have to wait a little (it
is on the request list ;-) or you can meanwhile make your situation a
bit easier:

browsers = ["App(os.path.join(r'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe')), ....., ]
selected = None
while not selected:
    prompt = "select a browser by entering Its number\n1 - chrome\n2 - firefox\n3 - ie\n4 - safari"
    selected = popup(prompt, "1")
    try: 
        selected = int(selected)
    except: 
        selected = None
        continue
    if (selected < 1 or selected > 4): continue
app = browsers[selected -1]

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