← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #204056]: Problem With For loop

 

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

Sathyamoorthy gave more information on the question:
I am also pasting my complete code here

popup("... NW_OSSR Automation process ...")
name = input("Enter ESX IP \n [Where to create VM for OSSR]")
vname = input("Enter the VM name \n [Which is not exists in ESX host]")
ndisk = input("Enter No.of Disk needed")
d = [ ]
for i in range(int(ndisk)): # Disk size info
    d.append(input("Enter the Size of Disk"))   
#d[i] = input("Enter the value of Disk")
vram = input("Enter the memory value")
popup("please note value for specific OS \n A -> Win2012 \n B -> W2K8R2 \n C -> W2K8 X64")
myApp = App("VpxClient.exe")
App.open("C:\\Program Files\\VMware\\Infrastructure\\Virtual Infrastructure Client\\Launcher\\VpxClient.exe")
wait(2)
App.focus("VMware vSphere Client")
popup("Default credential is root \ emclegato")
click("IPaddressnga.png")
type(name)
click("Username.png")
paste("root")
click("Password.png")
paste("emclegato")
click("1343136521911.png")
wait(2)
switchApp("Security Warning")
click("1343136671740.png")
wait(20)
wait(10)
type("n",KEY_CTRL)
wait(15)
switchApp("Create New Virtual Machine")
wait(3)
click("1343140495548.png")
rightClick("EewVirtualMa.png")
wait(1)
type("d")
type(vname)
wait(1)
click("Next-1.png")
click("Next-2.png")
click(Pattern("7MicrosoftWi-1.png").targetOffset(-48,-4))
click("il.png")
click("MicrosoftWin-3.png")
click("1343141758169.png")
doubleClick("40.png")
paste(d[0])
click("Next-3.png")
click("l.png")
click("Continue.png")
if (int(ndisk) > 1):
    ndisk = int(ndisk) - 1
    for i in range(ndisk):
        click("1343153484832.png")
        wait(1.5)
        click("HardDisk.png")
        click("1343145523513.png")
        click(Pattern("7Createanewv.png").targetOffset(-67,-2))
        click("Next-4.png")
        doubleClick(Pattern("IFDiskSize.png").targetOffset(28,0))
        type(d[i+1])
        click("Next-5.png")
        click("Next-6.png")
        click("Finish.png")
        
else:
    click("Finish-1.png")

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