operasoftware/operadriver — pull request #94 by Rob--W (2013-08-07 13:54:50+00:00)
Title: executeScript changes driver's execution context, breaking any test that involves .switchTo().frame(...)

Steps to reproduce:

1. Switch to a subframe using `driver.switchTo().frame("a")`
2. Cast the driver to a JavascriptExecutor, and call the executeScript
method.
3. Observe that the called function runs in the context of the top-level
document instead of the frame identified by "a".
4. Further, observe that any calls to findElement operate on the wrong
context.

Summarized: Calling `executeScript()` changes the frame context to _top.

Here's an excerpt of the log file:

```

junit.framework.AssertionFailedError: expected:<[a]> but was:<[]>
at com.opera.core.systems.FramesTest.switchToFrameAndExecuteScript(FramesTest.java:77)
at com.opera.core.systems.testing.TestRunner.runChild(TestRunner.java:113)
at com.opera.core.systems.testing.TestRunner.runChild(TestRunner.java:47)

```