Hi,
I’m trying to access CANVAS element in our WEB application (React, Java) however it is not easy.
Robot only is able to select whole canvas element. In our case it is a map were are added some point and route.
Anyone is familiar about, how to access those element inside canvas element ?
I have exactly the same problem. Were you able to solve it?
Hi Piotr & Gonzalo,
You didn’t mention which library you are trying to use, but from my quick search it looks like it will be difficult with both the common ones.
-
SeleniumLibrary is a wrapper around Selenium, which apparently has issues with <Canvas> due to using the DOM model, see this for more detail:
html - Interacting with a Canvas with Selenium - Stack Overflow -
Browser Library is a wrapper around Playwright which also appears to use DOM but according to this might be able to get to the element your after but it doesn go into detail, so more searching will be required
Playwright assertions on canvas - Stack Overflow
Hopefully this gives you a pointer in the right direction,
Dave.
1 Like