1) The local-action condition, if it is a WHEN rule, then it gets executed when the control is loaded. You can check the DOM generated(f12 developer tools) for that element to check if the local-action runs for that event.
2) Where have you written the JS function ClearAction()? In the Browser console, check if the function is defined. Or put a console.log("ANY CONTENT"); in the function to check if the function itself is called.
If you're using a RunScript to call that function, then inspect the element to check if the RunScript is present in the DOM of that element.