Robot Framework Drag and Drop

Asked by Arief Rahman

Hi, i'm trying sikuli robot framework and have succeed install and running a test or two with it, and Sikuli is a great Library to use!
However i'm facing a new problem here, when i try to use drag and drop keyword with image, let's say arrow button image. There are a lot of arrow button image on screen. My question is, how do i select specific arrow button image for srcImage?

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Looks like you are using a RFW wrapper, because you are talking about keywords, since SikuliX does not provide keywords.
So which wrapper do you use?

If you are scripting your own keywords though:
use findAll(), select the wanted match and then use drag drop with the match as source

Revision history for this message
Arief Rahman (ariefr) said :
#2

what do you mean by wrapper?
for now i only use this http://rainmanwy.github.io/robotframework-SikuliLibrary/doc/SikuliLibrary.html#Drag%20And%20Drop keyword, and i screenshot image to become srcImage and targetImage.

Revision history for this message
RaiMan (raimund-hocke) said :
#3

already thought, that you use this SikuliLibrary.

A wrapper is a piece of software, that implements some features on a higher level (RFW keywords here) using an existing API internally (SikuliX here).

In this case you have to post the issue on SikuliLibrary's github page or dive into the SikuliLibrary implementation to find a solution.

... or add your own keyword implementation.

Revision history for this message
Arief Rahman (ariefr) said :
#4

Wow, thank you for that explanation.
The keywords are works, drag and drop are works and i can use this perfectly when there is no similar images on screen.

But if there are similar images on screen, it confuses me.
so i'm not sure whether this is an issue or not.

And thank you again for your fast reply!
Maybe i will try to combine it with Click In keyword first before i post an issue.

Revision history for this message
Best RaiMan (raimund-hocke) said :
#5

On the level of SikuliX API the solution would be, to use findAll() and select the suitable match from the list of returned matches to finally use this as the drag source and/or target instead of the image/pattern.

Revision history for this message
Arief Rahman (ariefr) said :
#6

Thank you, i am trying to use RFW, but i will keep it in my mind.

Revision history for this message
Arief Rahman (ariefr) said :
#7

Thanks RaiMan, that solved my question.