sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #46726
Re: [Question #667420]: Linux Drag and Drop
Question #667420 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/667420
Jeff_Vallis gave more information on the question:
This is what I have been trying both work on desktop
Settings.MoveMouseDelay = 0
setRect(316,203,786,541)
v_Image_Desk ="1522682609903.png" # the image that I am moving on the desktop
v_Image = "1522664408893.png" # image on vikings screen
v_Do_Which = "Viking"
Start_Pos = find(v_Image)
dropregion = Location(714, 632)
dragregion = Location(714, 596)
if exists(v_Image_Desk):
print "Make sure its in right place from last time"
v_Do_Which = "Desk"
v_Image = v_Image_Desk
drag(dropregion)
wait(v_Wait)
dropAt(dragregion)
wait(3)
if v_Do_Which == "Desk":
click(Location(1236, 513)) # remove highlight
print "Remove Highlight"
wait(3)
if 1 == 2:
for i in range(20):
v_Wait = 0.5
for j in range(i):
v_Wait = v_Wait + 0.2
# Vikings Fails
# Desktop Works
#click(dragregion) ; wait(1)
print "Next do Drag"
drag(dragregion)
wait(v_Wait)
dropAt(dropregion)
print "Previous do Drop"
wait(3)
if v_Do_Which == "Desk":
click(Location(1236, 513)) # remove highlight if desk
print "Remove Highlight"
x = find(v_Image)
if Start_Pos.x <> x.x or Start_Pos.y <> x.y:
print "Found with Wait of",v_Wait
#click(dropregion) ; wait(1)
drag(dropregion)
wait(v_Wait)
dropAt(dragregion)
wait(3)
if v_Do_Which == "Desk":
click(Location(1236, 513)) # remove highlight
print "Remove Highlight"
wait(3)
exit(0)
exit(0)
if 1 == 1:
# Desktop works
# Vikings Fails
for i in range(50):
v_Wait = 0.5
for j in range(i):
v_Wait = v_Wait + 0.2
print "Next click location Wait",i,v_Wait
click(Location(dragregion.x, dragregion.y))
wait(1)
mouseDown(Button.LEFT)
wait(0.5+v_Wait)
mouseMove(dropregion)
wait(0.5+(v_Wait))
mouseUp()
wait(1+(v_Wait))
print "Previous mouseUp"
if v_Do_Which == "Desk":
click(Location(1236, 513)) # remove highlight
print "Remove Highlight"
x = find(v_Image)
if Start_Pos.x <> x.x or Start_Pos.y <> x.y:
print "Moved with wait of ",v_Wait
print "Move it back"
click(Location(dropregion.x, dropregion.y))
wait(1)
mouseDown(Button.LEFT)
wait(0.5+v_Wait)
mouseMove(dragregion)
wait(0.5+(v_Wait))
mouseUp()
wait(1+(v_Wait))
print "Previous mouseUp"
if v_Do_Which == "Desk":
click(Location(1236, 513)) # remove highlight
print "Remove Highlight"
exit(0)
exit(0)
exit(0)
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.