Not able to click a button using New Relic scripted browser

I am writing a scripted browser monitor for our Product which is a Microsoft word Add-in. The issue is when the Addin is loaded using the script, the sign-in button is bit distorted. The button looks fine when I manually open it in browser.

When the button is clicked manually, it should show a pop-up screen. When the click event is fired through the script, the popup is not shown in the screenshot and the script shows the error that is not able to locate the popup window (I am doing a findElement on that popup).

So I am not sure weather the click event is not triggering or click is triggered but the popup does not show up. I tried the solutions mentioned here:

and tried triggering a click through javascript but nothing happens and if I do a console.log inside $browser.executeScript, it is not logged. So it is not going inside executeScript.

I am not sure if all this is because the button looks distorted through the script. If so what can be done to solve it?

Attaching screen shot of button through the script and when loaded manually.

Any help is much appreciated.

Thanks,
Divisha


Have you tried ensuring that the browser screen is maximised and that the button is actually in view when attempting the click? There are posts on the forum for both of these.

I tried changing the browser size but still the button is distorted in the script screenshot. I am doing a waitForAndFindElement on the button before attempting a click and it does not give any error so I am assuming it is able to locate the element but not sure why the click event is not getting triggered.