testdriver currently doesn't allow interacting with browsing contexts with a different origin to the test. This is basically because it's not possible to get a reference to elements in those contexts.
For cases where we can get a window reference (i.e. not the rel=noopener case) the solution here is a simple extension of the existing system; we just need to allow invoking an action via postMessage i.e. the context that wants to run the action needs to post the action it wants to run to the top-level window and the top-level window needs to invoke the action and postMessage back to the source window once it's done. Presumably for ease of use this would be wrapped up in such a way that the user-API is promise based just like the standard testdriver API.
For the case of browsing contexts that are unable to get a handle to the test window (e.g. rel=noopener) this solution doesn't work and a larger change involving passing messages via the server will be required.
The text was updated successfully, but these errors were encountered: