By
and WebElement
are different type, hence the compilation error.
If you are talking about actions are not performed, then that's a totally different thing from your original post. Please ask a new question.
WebbElement
can be retrieved by driver.findElement(By locator)
, so you need to use driver.findElement(yourLocator)
to get element first.
Actions actions = new Actions(driver);
actions.moveToElement(driver.findElement(DCSAdminEnums.ACTIONBUTTON.getLocator()));
actions.moveToElement(driver.findElement(DCSAdminEnums.CREATEACTION.getLocator()));
actions.click().perform();