Error with pop-up

I have recorded some steps i a web application using browser driven protocol in SP 16.5

At some point there is a click on an input button.
Clicking that button results in opening a new window in the browser.
The content of the windows however stays empty (after clicking reload however it is loaded properly).
Also a unclear javascript error is shown when replaying the scenarrio.
BrowserClick(BrowserEngine: 43 - JavaScript error, "Exception thrown and not caugh

If i manualy do all the actions in a browser (Firefox of IE) nothing goes wrong.

How can i solve this or at least find out what is wrong?