2015-06-17 32 views
1

有誰知道如何用鼠標右鍵執行dragDrop()
我得到這個示例代碼:用鼠標右鍵怎樣做dragDrop()?

image = ("image.png") 
App.focus('<nameProgramHere>') 
imageE = find(image) 
rightClick(dragDrop(imageE, imageE.offset(Location(0, -250)))) 

它確實讓右擊,但dragDrop()預成型用鼠標左鍵點擊。
(我可以看到,因爲顏色然後在我的程序中不同)。

我在我的日誌中看到rightClick()。
[log] RIGHT CLICK on L(1039,556)@S(0)[0,0 1920x1080]

回答

1

找到答案,我自己如何用鼠標右鍵拖拽。

image = ("image.png") 

imageE = find(image) 
imageE.hover() 
wait(2) 
mouseDown(Button.RIGHT) 
mouseMove(imageE.offset(Location(0,-250))) 
wait(2) 
mouseUp()