How can you access the main JavaScript scope of the browser in a functional test? For example, I want to obtain a reference to a Dojo widget and check it's attributes. In a browser JavaScript console I could for example run:
dijit.registry.byId("widget_id")
...and get a reference to that widget. But how can I do this in the scope of a functional test? I've tried experimenting with the .eval() promise as well as just trying to access objects such as "window" in various promise callbacks but to no avail.
I'm sure there is a simple solution to this but I've not been able to find it.