Hi there, I am solving an issue where I would like to test an element that is part of a canvas (so no xpath available ). I found some libraries that are comparing images, but so far couldn’t find a solution, where I could click a visual element, or drag and drop etc. Does anything like that exist for RF?
You can use this library which helps to solve your library
pip install robotframework-doctestlibrary
Here are 2 libraries that might help:
Both work on comparing images as you mentioned, but also allow you raw control of the mouse and keyboard, so you can use a cropped screenshot of the element you want to drag and drop to find the location on the screen where the element is, then
mouse down, mouse move
(drag) and thenmouse up` (drop)
Also SikuliLibrary even has a Drag And Drop, you just pass it the image of the thing you want dragged and the image of the location you want it dragged to.
You can use the library you are using now from driving the web pages, just don’t use headless mode, when you get to the canvas part of your test, use one of these libraries to do that step and then continue using your test with the library you are using now.
Hope that helps,
Or you can use ImageRobot library… It works fine for me.