I have the dynatrace js agent piece of code and i am trying to inject that minified piece of code into the browser instances that pop up on when the protractor tests are running on the selenium grid.
The reason that this is not automatically injected is the fact that they are running on a docker container. What would be the best way to do a manual injection of the code in this case?
I tried doing this:
var dtagent = require('./dtagent-test.js');
browser.driver.executeScript("dtagent");
dtagent contains the minifed dynatrace code that needs to be injected.
but that did not work and it complained that window is not defined.
Any idea how this can work?
Thanks!