This can be done by checking if the PowerAppsTestEngine global object is loaded when testengine runs. Ideally, this should exist in serverside on load, if OnePlayer in use.
So, if not present we can proceed by injecting embedded JS.
Checklist
[x] The code change is covered by unit tests. I have added tests that prove my fix is effective or that my feature works
[x] I have performed end-to-end test locally.
[x] New and existing unit tests pass locally with my changes.
Pull Request Template
Description
Handling legacy webplayer support.
Checklist