How can i create a method that switch to JavascriptExecutor.click() function once if element.click() or action.moveToElement.click