Make sure our whole stack works.
From web application to video player. So we automate the UI portion of our web app to create an account, pick some content, and ultimately we need to test that a video player on a remote page loads correctly with the correct playlist. We can do it manually, but prefer to do it automatically. The video loading and having the right content can be checked programmatically - the video player SWF exposes some functionality through a JS API. And while I have several ways to embed a JS runtime in Java, none of them - as far as I know, can load a Flash object in the context of the DOM.
Selenium nearly works
for this but Firefox 3.0+ introduced an XSS protection that breaks it, and the most popular Firefoxes are our gold standard browsers for rendering compatibility. So yeah, we need the JS running in the page to communicate with our Java code. Firefox doesn't do WebSockets yet, so that's out, and it still relies on your code being in the page tested.
In the end, we're going to work around it using Selenium - it can still read the values of fields and what-not, it just can't directly execute JS in the page under test anymore. So we'll get some JS in the page under test communicating with us - maybe postMessage() to the Selenium frame. Or communicate via inputs...