Question

I am trying to get Selenium Grid to run using NAnt but am a little lost, as all explanations I can find use Ant - although I thought they were fairly similar, I can't seem to fire off Selenium Grid on my local PC in this way.

Here's the URLs to the Selenium Grid pages online that I've found, but they refer to Ant...

Get started

...leading on to

Run the demo

Was it helpful?

Solution

From the Selenium Grid page:

To run Selenium Grid, you need a valid Java 5+ JDK install on your system.

AFAIK NAnt is designed to work with .Net, not Java, so I think your best bet is to install Ant, Java 1.5 and Selenium Grid per the instructions, then invoke the ant task with a NAnt exec task.

OTHER TIPS

it is easy:

  <property name="selenium.server.file" value="${src.dir}\_tools\selenium\selenium-server.jar" />
  <property name="selenium.grid.hub.file" value="${src.dir}\_tools\selenium\selenium-grid-hub-standalone-1.0.4.jar" />
  <property name="selenium.grid.rc.file" value="${src.dir}\_tools\selenium\selenium-grid-remote-control-standalone-1.0.4.jar" />

start hub:

 <target name="start.selenium.grid.hub">
    <exec program="java" verbose="true" failonerror="false">
      <arg value="-jar" />
      <arg value="${selenium.grid.hub.file}" />
    </exec>
  </target>

start rc:

<target name="start.selenium.grid.rc">
    <exec program="java" verbose="true" failonerror="false">
      <arg value="-classpath" />
      <arg value="${selenium.server.file};${selenium.grid.rc.file}" />
      <arg value="com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher" />
    </exec>
  </target>

or simply from command line:

java -jar D:\work\SeleniumDesign\build_artifacts\artifacts\continuous\source_tools\selenium\selenium-grid-hub-standalone-1.0.4.jar

and

java -classpath D:\work\SeleniumDesign\build_artifacts\artifacts\continuous\source_tools\selenium\selenium-server.jar;D:\work\SeleniumDesign\build_artifacts\artifacts\continuous\source_tools\selenium\selenium-grid-remote-control-standalone-1.0.4.jar com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top