3I am using the selenium-server-standalone-2.33.0.jar to launch selenium test suites. I have a test suite that runs perfectly fine in firefox and also Internet Explorer. When I try and run it in Google Chrome, it runs fine for the current user. When I try and run the test from the local system user (open a command window running as the local system user), the test fails giving me a windows registry exception. Here is the command I am trying to run:
java -jar selenium-server-standalone-2.33.0.jar -port 5885 -htmlsuite "*googlechrome" "http://www.google.com" "TestSuite.html" "results.html"
This is the exception I am getting:
HTML suite exception seen:
java.lang.RuntimeException: org.openqa.selenium.os.WindowsRegistryException: Problem while managing
the registry, OS Version '6.1', regVersion1 = false
Build info: version: '2.33.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_38'
Driver info: driver.version: unknown
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.createBrowserLauncher(
BrowserLauncherFactory.java:175)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.getBrowserLauncher(Bro
wserLauncherFactory.java:109)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.getBrowserLauncher(HTMLLauncher.java:7
9)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:139)
at org.openqa.selenium.server.htmlrunner.HTMLLauncher.runHTMLSuite(HTMLLauncher.java:198)
at org.openqa.selenium.server.SeleniumServer.runHtmlSuite(SeleniumServer.java:630)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:305)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:245)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:54)
Caused by: org.openqa.selenium.os.WindowsRegistryException: Problem while managing the registry, OS
Version '6.1', regVersion1 = false
Build info: version: '2.33.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_38'
Driver info: driver.version: unknown
at org.openqa.selenium.os.WindowsUtils.executeCommand(WindowsUtils.java:558)
at org.openqa.selenium.os.WindowsUtils.runRegQuery(WindowsUtils.java:627)
at org.openqa.selenium.os.WindowsUtils.readStringRegistryValue(WindowsUtils.java:447)
at org.openqa.selenium.os.WindowsUtils.getLocalAppDataPath(WindowsUtils.java:274)
at org.openqa.selenium.browserlaunchers.locators.GoogleChromeLocator.usualWindowsLauncherLoc
ations(GoogleChromeLocator.java:64)
at org.openqa.selenium.browserlaunchers.locators.GoogleChromeLocator.usualLauncherLocations(
GoogleChromeLocator.java:50)
at org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator.browserDefaultPath(Sin
gleBrowserLocator.java:93)
at org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator.findAtADefaultLocation
(SingleBrowserLocator.java:81)
at org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator.findBrowserLocation(Si
ngleBrowserLocator.java:50)
at org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator.findBrowserLocationOrF
ail(SingleBrowserLocator.java:38)
at org.openqa.selenium.server.browserlaunchers.BrowserInstallationCache.locateBrowserInstall
ation(BrowserInstallationCache.java:46)
at org.openqa.selenium.server.browserlaunchers.GoogleChromeLauncher.<init>(GoogleChromeLaunc
her.java:67)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.server.browserlaunchers.BrowserLauncherFactory.createBrowserLauncher(
BrowserLauncherFactory.java:164)
... 8 more
Caused by: java.lang.RuntimeException: exec return code 1:
ERROR: The system was unable to find the specified registry key or value.
at org.openqa.selenium.os.WindowsRegistryException.<init>(WindowsRegistryException.java:35)
... 25 more
Ultimately I would like to allow selenium to run as a service so I need Chrome to work under the local system account. From what I understand, The selenium standalone jar file should already include a google chrome driver so there should be no reason I would need to download it.
Also, before I had gotten an error when running the test suite telling me I needed to add Google Chrome to my path variable. I did that and instead I am getting the above error so it seems as though selenium can find chrome.exe, it is just having issues either getting some registry key that does not exist or cannot launch chrome after it has been found. I installed chrome for all users so Google chrome is installed in Program Files (x86). Again, chrome tests PASS when run from my current account (the one I used to install chrome) with admin rights. Any help on the issue would be great!