sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #25759
Re: [Question #248290]: Recursive Processing of a List
Question #248290 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/248290
Status: Open => Answered
Eugene S proposed the following answer:
Hi Joe,
Happy that helps.
So if your text boxes are different you can try that:
1. Create and save the images for all 3 text boxes (I will call them "textbox1.png", "textbox2.png" and "textbox3.png")
2. Create a new list consisting of these images:
textBoxList = ["textbox1.png", "textbox2.png", "textbox3.png"]
3. Run the loop:
textBoxList = ["textbox1.png", "textbox2.png", "textbox3.png"]
lst = [apple, orange, grape, banana] #define a list
for item in lst: # For each item in the lst
for text in textBoxList: #Do that for each text box
click(item) #assuming that you have to click on the actual text box before you start input
type(text)
Make sure that Sikuli has access to the images you save. To do that you might want to take a look at "setBundlePath()". You can find more details about it here:
http://doc.sikuli.org/globals.html#setBundlePath
It lets you set the path for searching images in all Sikuli Script
methods.
Cheers,
Eugene
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.