← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #241041]: Automate a form which consists textboxes, dropdow, clicking checkboxes, etc in each iteration

 

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

    Status: Answered => Open

sravani is still having a problem:
The form which I need to be tested will look like below:

First Name : Text box
Last Name : Text box
Firm : Text box
State :  Dropdown box
Question : Yes [Check Box], No [Check Box]
Again some text fields........

I'm using sikuli IDE, where i'm taking images for clicking them, and automating that script through for loop
My script looks like below

test = []
f = open("C:\\test.txt","r")
for line in f.readlines(0): 
    (a, b, c, d, e) = line.strip().split()
    test.append([a.strip(), b.strip(), c.strip(), d.strip(), e.strip()])
    click("1386860853482.png") ------Image of a text box
    type(a)
    click("1386860853485.png")------Image of a text box
    type(b)
    click("1386860853487.png")------Image of a text box
    type(c)
    type("\t")
    type(Key.DOWN*5)             ----------------------------------Selecting an option from dropdown
    click("1386860853485.png") -------------------------------Image of a "YES" Check box
    click("1386860853488.png")------Image of a text box
    type(d)
    click("1386860853489.png")------Image of a text box
    type(e)   

I'm able to automate this script with similar action like selecting same
option in dropdown box and clicking one "Yes" check box. My question is
when the sikuli read a line from a text file it should click "Yes Check
box" and while reading some other line it should click "No image check
box". Is there any way to do this like using if-else loop - while
reading some lines it should click one image, and while reading some
other lines it should click other image.


I have seen "https://answers.launchpad.net/sikuli/+question/238004"; which looks like my requirement. But it was not clear. I'm having some questions like

Given in the Above Question: I want to be able to pass certain parameters to sikuli script such as images to be clicked on or text to be typed from a "config" file
My Question: can we store image names and text to be entered in one config file
if so where should be place our images

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