I am trying to simulate a click on buttons in this game BattleCry (the site is battlecry.mobi), but I cannot get it to click. I am not sure how to continue. I tried simulating a mouse event and using dispatchEvent, I tried element.click(), and I tried a function for a click I found online. I cannot find any way to make it work. Specifically I am trying to call a click on a mission button.
var evt = document.createEvent("MouseEvents");
evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
engageBtn.dispatchEvent(evt);
This is one of the things I have tried (engage button is a random missions button).
<a class="x-container doitbutton xbutton" id="ext-xbutton-108">ENGAGE</a>
This is what I need to click.