I'm running into the problem that I need to click on the expanded functions of an Element which is triggered by JS.
Picture to illustrate the UI: https://i.stack.imgur.com/SlJjz.jpg
So when I hover over the blue button, it will display 3 other shapes at the bottom. Those shapes'html code won't show until mouse is hovering on it. My approach was to use actions chain to hover over the blue button element then click off that element (in which way i can click on the 3 shapes below).
So far I have:
Actions action = new Actions(driver);
action.moveToElement(elementPosition).build().perform();
action.moveToElement(elementPosition, offsetx, offxety).click();
But I cannot click Offset the element, is it a proper way to do it? Thank you
Are you able to retrieve the HTML code for the three buttons once you have made them visible? If so, you should be able to find and click them using WebDriver.findElement() and WebElement.click() respectively.
For example:
In this example, it is imperative that you attempt to find the red button after the blue button has been hovered over.