Running a selenese Selenium test on the command-line using Chrome
command-line, google-chrome, macos, selenium
Solution
Use `*googlechrome` instead for chrome. That should fix it. *chrome is used to run firefox in another mode.
Problem
I used the Selenium IDE in Firefox to record a test suite in selenese, and I'd like to run these tests on the command-line using Chrome. (I'm running Mac OS X). I'm clearly doing something wrong, because when I try to do so, it runs in Firefox instead. I downloaded the chromedriver for OS X, and the selenium-server-standalone jar file, and put them both in /usr/local/bin. I thought the following command would do want I want, but it runs the tests inside of Firefox instead of Chrome. (Note, I'm testing a local app running at `http://localhost:8001`). ``` $ java -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver \ -jar /usr/local/bin/selenium-server-standalone-2.24.1.jar \ -htmlSuite "*chrome" http://localhost:8001 /Users/lorin/selenium/suite.html /Users/lorin//selenium/results.html ``` The output looks like this: ``` Jun 19, 2012 4:32:40 PM org.openqa.grid.selenium.GridLauncher main INFO: Launching a standalone server 16:32:45.880 INFO - Java: Apple Inc. 20.8-b03-424 16:32:45.881 INFO - OS: Mac OS X 10.7.4 x86_64 16:32:45.887 INFO - v2.24.1, with Core v2.24.1. Built from revision 17205 16:32:45.972 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub 16:32:45.973 INFO - Version Jetty/5.1.x 16:32:45.973 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver] 16:32:45.974 INFO - Started HttpContext[/selenium-server,/selenium-server] 16:32:45.974 INFO - Started HttpContext[/,/] 16:32:46.018 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@3b75078b 16:32:46.018 INFO - Started HttpContext[/wd,/wd] 16:32:46.024 INFO - Started SocketListener on 0.0.0.0:4444 16:32:46.025 INFO - Started org.openqa.jetty.jetty.Server@6db3f829 jar:file:/usr/local/bin/selenium-server-standalone-2.24.1.jar!/customProfileDirCUSTFFCHROME 16:32:46.103 INFO - Preparing Firefox profile... 16:32:47.013 INFO - Launching Firefox... 16:32:47.734 INFO - Checking Resource aliases 16:33:00.781 INFO - Checking Resource aliases 16:33:00.783 INFO - Received posted results 16:33:01.537 INFO - Killing Firefox... 16:33:01.608 INFO - Shutting down... ```