I am building test plan using (selenium webdriver - java) for page that contain button which open small color selection window.
this is the code of the right panel o
You can use findElement instead of getElementById,
JavascriptExecutor js = (JavascriptExecutor) driver;
WebElement element = driver.findElement(By.id("colorPickIcon"));
js.executeScript("arguments[0].setAttribute('style', 'top:22.3333px')", element);
You can refer the link How to use JavaScript with Selenium WebDriver Java