← Back to team overview

sikuli-driver team mailing list archive

[Question #661046]: How to reuse the code in sikuli

 

New question #661046 on Sikuli:
https://answers.launchpad.net/sikuli/+question/661046

How to reuse the code in sikuli :

Hi Guys, sorry for the repeated question but I am unable to understand / implement the solutions i found.

1. I have created a script to read data from excel row by row from 1st column & i want to paste it somewhere in browser and perform few steps then i want to go back to that excel and read 2nd row data and so on till there is a data in 1st column.
As soon as i find a blank row i want to stop

2. Or i would like to perform read operation say 100 times is it possible ?

My code :
hover("1511501830618.png")
click("1511501830618.png")
hover("1511330922974.png")
click("1511330922974.png")
type(Key.DOWN)
print("Message : Down Button pressed...")
wait(1)
while not exists("1511502908573.png"):
    print("Message : Keyword found...")
    wait(1)
    type("c",KEY_CTRL)
    wait(1)
    hover("1511501976440.png")
    click("1511501976440.png")
    wait(1)
    type("v",KEY_CTRL)
    wait(1)
    click("1511501830618.png")
    type(Key.DOWN)
    wait(1)
    hover("1511502768982.png")
    while exists("1511503440749.png"):
        print("Message : No Keyword found...")
        break;

Please help me with this guys, Thanks in Advance !!

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.