How to interact with Angular ColorPicker components using Selenium WebDriver? There’s no text field input for hex codes, and it’s operated purely by mouse clicks. An example of it can be seen here: https://www.primefaces.org/primeng/showcase/#/colorpicker
Well you have the handle object:
You can try to drag it via Selenium up or down
For selecting colors you can find the "main" color picker and click not on the center of it, but by giving it offset:
WebElement element = browser.findElement(By. cssSelector(cssExpression)); Actions builder = new Actions(browser); Action action = builder.moveToElement (element, -20, -20).click().build(); action.perform();
You can play with the values and move in the X -50, and in Y -70 for example.