I am trying to use ANT to start a Selenium Grid instance. Using the response found here, How can I run Selenium 2 Grid from an Ant build? , I was able to start the Grid successfully using the following build.xml
<project name="selenium-grid" default="launch-hub" basedir=".">
<property name="selenium.version" value="2.28.0"/>
<property name="sauce.version" value="1.0.8"/>
<path id="selenium.classpath">
<pathelement path="${basedir}/"/>
<fileset dir="${basedir}/">
<include name="selenium-server-standalone-${selenium.version}.jar"/>
<include name="sauce-grid-plugin-${sauce.version}.jar"/>
</fileset>
<pathelement path="${java.class.path}/"/>
</path>
<target name="launch-hub"
description="Launch Selenium Hub">
<java classname="org.openqa.grid.selenium.GridLauncher"
classpathref="selenium.classpath"
fork="true"
failonerror="true">
<arg value="-role"/>
<arg value="hub"/>
</java>
</target>
</project>
ant launch-hub
Moving on, I would like to use Sauce Labs Grid plug-in with the Selenium Grid which can be found here: https://github.com/rossrowe/sauce-grid-plugin/wiki Following the wiki, I can start the two on my windows machine using the following from DOS
java -cp selenium-server-standalone-2.25.0.jar;sauce-grid-plugin-1.0.7.jar org.openqa.grid.selenium.GridLauncher -role hub -servlets com.saucelabs.grid.SauceOnDemandAdminServlet,com.saucelabs.grid.SauceOnDemandConsoleServlet
Now I want to incorporate the Sauce lab Servlets by adding to the target "launch-hub" to the arguments for the Sauce labs "servlets" (sorry having trouble posting the real code)
arg value="-servlets" arg value="com.saucelabs.grid.SauceOnDemandAdminServlet,com.saucelabs.grid.SauceOnDemandConsoleServlet"
I relaunched using
ant launchand here here is the error returned by windows:
launch-hub: [java] 17 janv. 2013 10:58:40 org.openqa.grid.selenium.GridLauncher main [java] INFO: Launching a selenium grid server [java] 17 janv. 2013 10:58:50 org.openqa.grid.web.utils.ExtraServletUtil createServlet [java] ATTENTION: The specified class : com.saucelabs.grid.SauceOnDemandAdminServlet cannot be instanciated com.sau celabs.grid.SauceOnDemandAdminServlet [java] 17 janv. 2013 10:58:50 org.openqa.grid.web.utils.ExtraServletUtil createServlet [java] ATTENTION: The specified class : com.saucelabs.grid.SauceOnDemandConsoleServlet cannot be instanciated com.s aucelabs.grid.SauceOnDemandConsoleServlet [java] 2013-01-17 10:58:50.806:INFO:osjs.Server:jetty-7.x.y-SNAPSHOT [java] 2013-01-17 10:58:50.866:INFO:osjsh.ContextHandler:started o.s.j.s.ServletContextHandler{/,null} [java] 2013-01-17 10:58:50.876:INFO:osjs.AbstractConnector:Started SocketConnector@0.0.0.0:4444`enter code here
The Selenium Grid starts but without the servlets, thus no Saucelabs access
Any ideas?
Update Got it working using 1.0.7 of the sauce plugin. No go with version 1.0.8