In my first very simple test of Selenium with GhostDriver (PhantomJS) the tests pass, but PhantomJS.exe doesn't exit. I'm running on Windows 7, PhantomJS 1.9.0, Selenium WebDriver API 2.32.1 and NUnit 2.6.2.12296, .NET 3.5.
Here's my C#/Nunit/WebDriver code:
[TestFixture]
public class Driver
{
IWebDriver driver;
[SetUp]
public void Setup()
{
driver = new PhantomJSDriver(@"D:\src\Tests\Drivers");
}
[TearDown]
public void Teardown()
{
driver.Quit();
driver.Dispose();
}
[Test]
public void GoogleSearch()
{
//Navigate to the site
driver.Navigate().GoToUrl("http://www.google.com");
Assert.AreEqual("Google", driver.Title);
}
}
And here's everything from PhantomJS:
PhantomJS is launching GhostDriver...
[INFO - 2013-04-26T16:38:56.417Z] GhostDriver - Main - running on port 64183
[INFO - 2013-04-26T16:38:56.630Z] Session [c9f2b8e0-ae8f-11e2-a7c1-159b6700bc86
] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs","version":"",
"platform":"ANY"}
[INFO - 2013-04-26T16:38:56.649Z] Session [c9f2b8e0-ae8f-11e2-a7c1-159b6700bc86
] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":
"1.9.0","driverName":"ghostdriver","driverVersion":"1.0.3","platform":"windows-7
-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"d
atabaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":f
alse,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnab
led":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":
{"proxyType":"direct"}}
[INFO - 2013-04-26T16:38:56.701Z] SessionManagerReqHand - _postNewSessionComman
d - New Session Created: c9f2b8e0-ae8f-11e2-a7c1-159b6700bc86
[INFO - 2013-04-26T16:38:59.470Z] ShutdownReqHand - _handle - About to shutdown
But it never does shutdown... Any ideas?