operasoftware/operadriver — Issue #48: webDriver.close() causing org.openqa.selenium.WebDriverException: org.openqa.selenium.WebDriverException: Error on command: service: "window-manager"
Author: java-developer
Created: 2012-01-09 09:32:15+00:00
State: open

Hello,

I am getting an exception when I run this code (which works perfectly with FireFox and Chrome):

```
final ThreadLocal webDriver = new ThreadLocal();
final OperaDriver driver = new OperaDriver();
webDriver.set(driver);
// Do stuff
webDriver.close();
```

Environment:

OS: OSX 10.7.2
Selenium: 2.15.0
OperaDriver: 0.8.1 / HEAD

StackTrace:

org.openqa.selenium.WebDriverException: org.openqa.selenium.WebDriverException: Error on command: service: "window-manager"
commandID: 1
format: 0
status: 4
tag: 106
payload: "\n\020No active window"

Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 12:59:39'
System info: os.name: 'Mac OS X', os.arch: 'amd64', os.version: '10.7.2', java.version: '1.7.0-u2-b21'
Driver info: driver.version: unknown
Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 12:59:39'
System info: os.name: 'Mac OS X', os.arch: 'amd64', os.version: '10.7.2', java.version: '1.7.0-u2-b21'
Driver info: driver.version: unknown
at com.opera.core.systems.WaitState.onException(WaitState.java:253)
at com.opera.core.systems.ScopeServices.onException(ScopeServices.java:775)
at com.opera.core.systems.scope.stp.StpConnection.processMessage(StpConnection.java:546)
at com.opera.core.systems.scope.stp.StpConnection.readMessage(StpConnection.java:460)
at com.opera.core.systems.scope.stp.StpConnection.canRead(StpConnection.java:270)
at com.opera.core.systems.util.SocketMonitor.processSelectionKey(SocketMonitor.java:246)
at com.opera.core.systems.util.SocketMonitor.pollSockets(SocketMonitor.java:177)
at com.opera.core.systems.util.SocketMonitor.poll(SocketMonitor.java:149)
at com.opera.core.systems.scope.stp.StpThread.run(StpThread.java:60)
Caused by: org.openqa.selenium.WebDriverException: Error on command: service: "window-manager"
commandID: 1
format: 0
status: 4
tag: 106
payload: "\n\020No active window"

Build info: version: '2.15.0', revision: '15105', time: '2011-12-08 12:59:39'
System info: os.name: 'Mac OS X', os.arch: 'amd64', os.version: '10.7.2', java.version: '1.7.0-u2-b21'
Driver info: driver.version: unknown
... 7 more

I hope someone can help.

Thanks,

Craig