Selenium Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID selenium Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
2.4.1 (archives)
Apr 12, 2014
1.478
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Richard Lavoie (id: darkrift)
Usage Installations 2014-Apr 1303
2014-May 1314
2014-Jun 1349
2014-Jul 1435
2014-Aug 1516
2014-Sep 1501
2014-Oct 1590
2014-Nov 1580
2014-Dec 1531
2015-Jan 1580
2015-Feb 1627
2015-Mar 1745

This plugin turns your Jenkins cluster into a Selenium2 Grid cluster, so that you can utilize your heterogeneous Jenkins clusters to carry out Selenium tests. It now has configurations to really specify the capabilities of each node so it won't fail your tests when a node is started with incompatible capabilities.

Selenium Grid deployment on Jenkins cluster

This plugin sets up Selenium Grid in the following way

  • On master, Selenium Grid Hub is started on port 4444. This is where all your tests should connect to.
  • For each slave, necessary binaries are copied and Selenium RCs are started.
  • RCs and the Selenium Grid Hub are hooked up together automatically.

Grid can also accept additional nodes launched outside Jenkins.

Connecting to Selenium Grid

When you run selenium tests in stand-alone Selenium, you specify the type of the browser in the constructor.

WebDriver driver = new RemoteWebDriver(new URL("http://jenkins.mydomain:4444/wd/hub"), capability);

In addition to standard platform matching capability offered out-of-the-box by Selenium Grid, Jenkins allows you to specify "jenkins.label" as a capability, whose value is an expression of label names to narrow down where to run the tests. See the following example:

DesiredCapabilities capability = DesiredCapabilities.firefox();
// say you use the redhat5 label to indicate RHEL5 and the amd64 label to specify the architecture
capability.setCapability("jenkins.label","redhat5 && amd64");
// Say you want a specific node to thread your request, just specify the node name (it must be running a selenium configuration though)
capability.setCapability("jenkins.nodeName","(master)");

These capabilities are matched by a custom capability matcher.

Connecting from Selenium 1 client

Selenium 1 clients can connect to this via the following syntax:

new DefaultSelenium("jenkins.mydomain", 4444, "*firefox", 'http://amazon.com');

Due to the underlying code change in Selenium, this plugin no longer allows Selenium1 clients to do label-based capability matching like the previous versions. If this is important, please use the selenium plugin 1.5, which is the last version that shipped with Selenium Grid 1, which supported the "LABEL[&LABEL&...]:BROWSER" syntax in the browser field to select nodes via labels.

browser string meaning
*iexplore Pick an available slave randomly, and run IE there. Since there's no guarantee that the randomly selected slave can actually run IE, this way of specifying a browser is unreliable unless all your slaves are Windows.
windows:*iexplore Pick an available slave that has the 'windows' label randomly, and run IE. This gives you assurance that IE will be executable
windows&32bit:*firefox Run Firefox on a node that has both 'windows' and '32bit' labels

The "BROWSER" portion is passed as-is to the selenium RC. For valid values, see this and this.

Changelog

Version 2.4.1 (April 12th, 2012)

  • Added missing configuration for system properties (webdriver.ie.driver and webdriver.chrome.driver for example) for the direct JSON configuration to be useful. 

Version 2.4 (April 11th, 2012)

  • Added a way to specify the hub host name for slaves to connect to.
  • Added a new JSON configuration type where you can directly specify a configuration directly in JSON.
  • Now bundling the IE server so it deploys it on windows machine directly for the RC configuration and WD configuration types.
  • Allows the hub to be restarted if needs be. Happens sometimes that the hub process goes nuts and needs a restart without having to restart jenkins.
  • Improved rendering of the selenium main page where it groups the available sessions per host instead of listing them all straight. Was not really nice when you have more than 3-4 selenium nodes connected to the hub.
  • When a node configuration is removed, it is now stopped on all the slaves and removed from the running configurations.
  • Various other small fixes and improvements in the code

Version 2.3 (Never released)

  • Had a problem with the release process and the plugin never got to the jenkins server.

Version 2.4 (April 11th, 2012)

  • Added a way to specify the hub host name for slaves to connect to.
  • Added a new JSON configuration type where you can directly specify a configuration directly in JSON.
  • Now bundling the IE server so it deploys it on windows machine directly for the RC configuration and WD configuration types.
  • Allows the hub to be restarted if needs be. Happens sometimes that the hub process goes nuts and needs a restart without having to restart jenkins.
  • Improved rendering of the selenium main page where it groups the available sessions per host instead of listing them all straight. Was not really nice when you have more than 3-4 selenium nodes connected to the hub.
  • When a node configuration is removed, it is now stopped on all the slaves and removed from the running configurations.
  • Various other small fixes and improvements in the code

Version 2.3 (Never released)

  • Had a problem with the release process and the plugin never got to the jenkins server.

Version 2.1 (Sept 4, 2012)

  • Rewrote the whole plugin to add configurations and service management.

Version 2.0 (Dec 26, 2011)

  • Substantially modified to work with Selenium 2.

Version 1.5 (Dec 24, 2011)

  • pull request 4 Added -browserSessionReuse option
  • Improved error diagnostics when the Jenkins URL isn't configured.

Version 1.4 (Mar 4, 2011)

  • Made the log level configurable (issue #5637)
  • Fixed possible selection of wrong Selenium RC.
  • Upgraded to Selenium Grid 1.0.7 (issue #6207)

Version 1.3 (Jan 25, 2010)

  • Make sure hub was started before launching RCs (issue #5370)
  • Supported trustAllSSLCertificates option (issue #5372)

Version 1.2 (Sep 7, 2009)

  • Upgraded to Selenium Grid 1.0.4
  • Upgraded to Selenium Server 1.0.1
  • Allow nodes to be excluded from the Grid
  • Specify additional Remote Control startup options (-browserSideLog, -log, -debug, -firefoxProfileTemplate)

Version 1.0 (Apr 26, 2009)

  • First version

Labels

plugin-cluster plugin-cluster Delete
selenium selenium Delete
grid grid Delete
plugin plugin Delete
cluster cluster Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jun 26, 2009

    Sylvain says:

    Selenium server is bundled in plugins/selenium/WEB-INF/classes/hudson/plugins/se...

    Selenium server is bundled in plugins/selenium/WEB-INF/classes/hudson/plugins/selenium/selenium-grid.tgz.

    This makes hard to change server implementation since you need to replace its JAR in this TGZ which is embedded in plugin dist: you must repeat this operation each time you updgrade Selenium plugin.

    Any chance you make this easier by externalizing Selenium JARs in another directory ?

    Anyway: great plugin

    NB : I need Tellurium implementation of Selenium server

  2. Aug 31, 2009

    Dave Searle says:

    Hi, I am having an issue with the delimiter that is used for selecting the RC. ...

    Hi,

    I am having an issue with the delimiter that is used for selecting the RC. The browser string I specify is:

    ff3.5:*custom c:/bin/firefox35/firefox.exe -profile c:/bin/firefox35/profiles/selenium

    This is because I have Firefox 3.0 and 3.5 installed on the same machine but the plugin is tokenizing based on the colon. So it fails to launch as it does not strip out the label because there is more than one colon. Current work around is to use:

    ff3.5:*custom /bin/firefox35/firefox.exe

    which works (because it is all on C Drive) but does not give me a custom profile (if I remove the c: for the profile firefox does not start). Can this be changed to allow for windows (and unix) paths in the string. Perhaps the delimiter could be something different?

    public class HudsonEnvironmentManager extends EnvironmentManager {
        /**
         * We accept "label:browser"
         */
        @Override
        public Environment environment(String name) {
            String[] tokens = name.split(":");
            if(tokens.length==2)
                return new Environment(tokens[0],tokens[1]);
            // take a chance and let it run on any RC.
            // this is useful for maintaining compatibility with standalone RCs
            return new Environment("&",name);
        }
    



  3. Oct 21, 2009

    Volker says:

    For those who need to change the grid configuration: It seems that the plugin u...

    For those who need to change the grid configuration:

    It seems that the plugin uses the grid_configuration.yml from within the /var/hudson/selenium-grid/lib/selenium-grid-hub-standalone-1.0.4.jar and not the one located in /var/hudson/selenium-grid. Maybe you have to change the selenium sources to make it look in the correct folder / location.

    see gridConfiguration() in https://svn.openqa.org/svn/selenium-grid/trunk/hub/src/main/java/com/thoughtworks/selenium/grid/hub/HubRegistry.java
    and https://svn.openqa.org/svn/selenium-grid/trunk/infrastructure/core/src/main/com/thoughtworks/selenium/grid/configuration/ResourceLocator.java

    Modifying the grid_configuration.yml and putting it into the .jar works for me.

    1. Oct 29, 2009

      Volker says:

      After having a look at the plugin sources I found that the grid-configuration fi...

      After having a look at the plugin sources I found that the grid-configuration file is only read for printing the configuration to the log, but has no other effect. In contrast, the grid chooses only those environments that follow the syntax LABEL:BROWSER, where BROWSER must not contain any colon.

      Since I was not able to compile the plugin, it would be great if someone else could verify that the following fix works:

      change the hudson.plugins.selenium.HudsonEnvironmentManager.environment(String) to:

          public Environment environment(String name) {
          	int colonIndex = name.indexOf(":");
          	if(colonIndex != -1) {
      	    String envName = name.substring(0, colonIndex);
      	    String browser = name.substring(colonIndex + 1);
                  return new Environment(envName,browser);
          	}
              // take a chance and let it run on any RC.
              // this is useful for maintaining compatibility with standalone RCs
              return new Environment("&",name);
          }
  4. Nov 17, 2009

    Mathieu HICAUBER says:

    Hi, I've successfully deployed selenium grid on a Hudson 1.329 - everything is f...

    Hi,
    I've successfully deployed selenium grid on a Hudson 1.329 - everything is fine.
    However I intended to do the same work on a 1.309, and I can't get it to work : installation of the plugin show no errors :
    INFO: Starting the installation of Selenium Plugin on behalf of mhicauber
    17 nov. 2009 09:48:37 hudson.model.UpdateCenter$UpdateCenterConfiguration download
    INFO: Downloading Selenium Plugin
    17 nov. 2009 09:48:48 hudson.diagnosis.HudsonHomeDiskUsageChecker doRun
    INFO: Not on JDK6. Cannot monitor HUDSON_HOME disk usage
    17 nov. 2009 09:50:39 hudson.model.UpdateCenter$DownloadJob run
    INFO: Installation successful: Selenium Plugin
    But when I restart the hudson server I get the following error :
    17 nov. 2009 09:52:09 hudson.PluginManager
    GRAVE: Failed to load a plug-in selenium
    hudson.util.IOException2: Failed to initialize
    at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:224)
    at hudson.PluginManager.(PluginManager.java:154)
    at hudson.model.Hudson.(Hudson.java:549)
    at hudson.WebAppMain$2.run(WebAppMain.java:191)
    Caused by: hudson.util.IOException2: Failed to extract input stream
    at hudson.FilePath.readFromTar(FilePath.java:1386)
    at hudson.FilePath.access$200(FilePath.java:154)
    at hudson.FilePath$7.invoke(FilePath.java:475)
    at hudson.FilePath$7.invoke(FilePath.java:473)
    at hudson.FilePath.act(FilePath.java:635)
    at hudson.FilePath.untarFrom(FilePath.java:473)
    at hudson.FilePath.installIfNecessaryFrom(FilePath.java:541)
    at hudson.plugins.selenium.PluginImpl.install(PluginImpl.java:207)
    at hudson.plugins.selenium.PluginImpl.createSeleniumGridVM(PluginImpl.java:185)
    at hudson.plugins.selenium.PluginImpl.start(PluginImpl.java:78)
    at hudson.ClassicPluginStrategy.startPlugin(ClassicPluginStrategy.java:232)
    at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:221)
    ... 3 more
    Caused by: java.io.FileNotFoundException: /root/.hudson/selenium-grid/./Capfile (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.(FileOutputStream.java:179)
    at java.io.FileOutputStream.(FileOutputStream.java:131)
    at hudson.FilePath.readFromTar(FilePath.java:1369)
    ... 14 more
    Indeed, Hudson is right : the selenium-grid directory doesn't exist in ~/.hudson
    Any idea ?
    Thank you,
    Mathieu.

  5. Feb 03, 2010

    Peter Gengler says:

    Hi, First, totally dig the idea of this plugin, it seems like it will work wel...

    Hi,

    First, totally dig the idea of this plugin, it seems like it will work well once I get it all happily configured; however, I am having issues trying to get nodes configured, both windows and linux (ubuntu).  For some detail I'm running Hudson 1.343 and the 1.3 version of the plugin (which I believe are the most recent).  The server/master is running ubuntu 8.04.2 and is proxied through Apache (i.e. so i can do http://hudson.domain instead of http://hudson.domain:8080).  I've split my questions into two, one about Linux and one about Windows as they're a little long and I figured that'd be easier to track.

    I'll start with linux since it goes farther into the process.  I tried the JNLP route (since that was what I tried with the Windows node, which I had done first) but that didn't work at all, so I moved to ssh which seemed cooler for linux anyways (so that it would configure from the master vs. the slave).  At first when adding the nodes in Hudson they would get all setup as hudson nodes but hit an exception when trying to do the selenium stuff.  Unfortunately I forgot to capture the stack trace.  However, this was with Hudson 1.342 and when I upgraded to 1.343 it started successfully setting up the selenium part too; not sure if this was 1.343 or the Hudson restart or what.  At any rate the slave is there, its listed in http://hudson.domain:4444/console and if i run against that URL with a test it will try to go; however, it can't run any tests.  When I try to run one it fails opening the browser (Firefox 3.0) with this error:

    11:16:00.932 INFO - Allocated session 356444fa6b784141af114a114cb87cfc for http://hudson.domain/, launching...
    11:16:00.940 DEBUG - Extracting /customProfileDirCUSTFFCHROME to /tmp/customProfileDir356444fa6b784141af114a114cb87cfc11:16:00.976 INFO - Preparing Firefox profile...
    Error: no display specified
    11:16:21.169 ERROR - Failed to start new browser session, shutdown browser and clear all session datajava.lang.RuntimeException: Timed out waiting for profile to be created!    
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:305)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:106)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:83)
        at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:350)
        at org.openqa.selenium.server.browserlaunchers.FirefoxLauncher.launchRemoteSession(FirefoxLauncher.java:98)
        at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:357)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:122)
        at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:84)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:699)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:393)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:364)
        at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:125)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
        at org.mortbay.http.HttpServer.service(HttpServer.java:909)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    11:16:21.209 DEBUG - clearing queue set
    11:16:21.237 INFO - Got result: Failed to start new browser session: Error while launching browser on session null
    

    I've also tried directly going to the port exposed by the slave and I get the same result.  As another experiment I downloaded the 1.04 selenium grid distribution (should be the same one that is used by the 1.3version of the plugin) and started that with rake rc:start and the appropriate options and when I use that it does correctly open a browser.  The startup commands for each are different, altough I can't figure out what is making the difference; here is what the java startup command looks like for each

    Selenium RC via Hudson plugin (non-working)


    Starting Selenium RC[selenium-grid] $ /usr/lib/jvm/java-6-sun-1.6.0.16/jre/bin/java
      -cp /tmp/hudson/slave.jar hudson.remoting.Launcher
      -cp /tmp/hudson/selenium-grid/lib/commons-httpclient-3.1.jar:/tmp/hudson/selenium-grid/lib/selenium-grid-remote-control-1.0.4.jar:/tmp/hudson/selenium-grid/vendor/selenium-server-1.0.1.jar
      -connectTo localhost:48786
    channel started
    Starting Selenium RC with [-host, slave.domain, -port, 47949, -env, /firefox/slave/linux/,
      -hubURL, http://hudson.domain:4444/, -log, selenium.debug.log, -debug]
    

    Selenium RC via Rake (working)


    java -cp "/home/fakeuser/selenium-grid-1.0.4:/home/fakeuser/selenium-grid-1.0.4/vendor/selenium-server-1.0.1.jar:
      /home/fakeuser/selenium-grid-1.0.4/lib/selenium-grid-remote-control-standalone-1.0.4.jar"
      com.thoughtworks.selenium.grid.remotecontrol.SelfRegisteringRemoteControlLauncher
      -host slave.domain -port 5555 -hubUrl http://hudson.domain:4444 -env '*firefox'
      >"/home/fakeuser/selenium-grid-1.0.4/log/rc-5555.log" 2>&1
    

    The only perhaps meaningful difference I can see is Hudson using selenium-grid-remote-control-1.0.4.jar whereas the rake command uses selenium-grid-remote-control-standalone-1.0.4.jar.  I'm still pretty confused about what all the various JAR files are that are included with Selenium Grid, so I don't know which one is more right or what difference they'd have.Sorry about the lenght, wanted to make sure I was thorough.  If anyone has ideas or suggestions please let me know.

    Thanks,

    \Peter

  6. Feb 03, 2010

    Peter Gengler says:

    My windows issue has significantly less information.  I'm trying to get a w...

    My windows issue has significantly less information.  I'm trying to get a windows 7 client running.  I've turned off Firewall to make sure that isn't blocking anything and I verified that the hudson master can ping the slave.  Again in this scenario Hudson adds the node just fine, deploys out maven.jar and whatever else it does, but then I get that dreaded

    Unable to determine the host name. Skipping Selenium execution.
    

    I've seen that on other threads but they all seemed to be having issues with the pinging/accessiblity, but I don't believe that is my issue here, or at least not in the same way.  Unfortunately, I'm unclear what other debugging I can do; is there any additional insight on how Hudson's plugin is trying to get the host name and how to pass that through to Selenium correctly?

    My other problem on Windows is that I'm using the JNLP method so I'm starting up from the client; that registers fine (aside from the issue above) but when I try to install as a window service from the menu item it gives me a permissions error.  Anything special I need to be doing here?  Also, I'm presuming installing as a service and running on startup will make this slave auto-connect to the hub when it boots is that correct?  Is there a more preferred way to get Windows clients on board?  I've seen varying information on what method to so, I'd like to use the most support method that will allow me to run browser tests (i.e. need a GUI) on the Windows RC; obviously being able to manage from Hudson (ala the SSH of the Linux clients) is preferred, but not at the expense of an extremely complicated setup.

    Thanks,

    \Peter

    1. Apr 18, 2012

      bgottschalk says:

      Peter,  I realize your post is nearly two years old but I'm wondering if y...

      Peter, 

      I realize your post is nearly two years old but I'm wondering if you ever resolved this issue?  I'm having a similar problem and have found no other information that is helpful.  

      Bart

      1. Jun 18, 2012

        marvix says:

        Also having this issue. In my installation all winXP clients works, but Win7 cl...

        Also having this issue.

        In my installation all winXP clients works, but Win7 clients don't, both 32 and 64 bits. So I think It's win7 related.

        anyone solved?

        Thanks, Marvi

  7. Apr 27, 2010

    Paweł Paprota says:

    I'm trying to use the plugin on Hudson 1.355 to no avail - it doesn't seem to co...

    I'm trying to use the plugin on Hudson 1.355 to no avail - it doesn't seem to copy Selenium RC binaries to slaves and connect Selenium RC instances to the grid. Selenium Grid starts up fine on master though. Do I have the right idea about RC deployment, ie. should it indeed happen on slave startup?

    Sample slave startup log (Windows slave):

    Connecting to 192.168.15.174
    Copying slave.jar
    Starting the service
    Waiting for the service to become ready
    Connecting to port 1,533
    <===[HUDSON REMOTING CAPACITY]===>���Slave.jar version: 1.355
    This is a Windows slave
    Copied maven-agent.jar
    Copied maven-interceptor.jar
    Copied maven2.1-interceptor.jar
    Slave successfully connected and online

    1. Jun 07, 2010

      Sara Vossoughi says:

      .
    2. Jun 07, 2010

      Sara Vossoughi says:

      Pawel, I am also having trouble running the Remote Controls from the hudson ser...

      Pawel,

      I am also having trouble running the Remote Controls from the hudson server. How are you launching the RCs? Did you use a plug-in or the groovy script console?

      Cheers,
      Sara

  8. May 19, 2010

    Bill Hansley says:

    Any plans to update this to Sel Grid 1.0.7 (the latest at this time)? It adds so...

    Any plans to update this to Sel Grid 1.0.7 (the latest at this time)? It adds some very nice features for the hub detecting dead clients and for clients to reattach to the hub.

    Is upgrading as simple as renaming / dropping the new Sel Grid jars (client + server) into plugins/selenium/WEB-INF/lib or is there more magic involved in how those are built?

    @Peter: We had miserable luck getting regular selenium running on Win7 (our dev machines). After lots of futzing with UAC and admin privs, I finally found SauceRC, a freely available SeleniumRC client that installs and works great with Win7. No grid features that I'm aware of though.

    Thanks!

  9. Jun 28, 2010

    saravanakumar p says:

    I am using selenium grid 1.0.3. My master runs on linux and my slaves are all wi...

    I am using selenium grid 1.0.3. My master runs on linux and my slaves are all windows VM connected thru ssh using cygwin.

    I made little change in the code to run hub on one of the windows slave rather than on the master. for that i made changes in the following files

    1. PluginImpl.java- commented the code which will start hub on the master. added one more field to read hub host name from user.

    2. CompluterListernerImpl.java- made following change to start hub on slave matching the user input and start RC on slave having Label as RC.

    The problem now is that Grid is copied too slave and starts Hub fine as per the log where as RC's are failing to register with the hub saying connection refused exception. I also not able to view grid console: http://<hotname>:4444/console returns nothing...

    PluginImpl.java
    public class PluginImpl extends Plugin implements Action, Serializable {
    77 	private String port= "4444";
    78 	private String hubhost="localhost";
    79 	static int hubPort;
    80 	static String HubHost;
    81 	/**
    82 	* Channel to Selenium Grid JVM.
    83 	*/
    84 	transient Channel channel;
    85 	
    86 	private transient Future<?> hubLauncher;
    87 	
    88 	static boolean IsHubHostConnected=false;
    89 	
    90 	static PrintStream loggr;
    91 	
    92 	static StreamTaskListener listener;
    93 	
    94 	/* @DataBoundConstructor()
    95 	public PluginImpl(String hubPort,String hubhost)
    96 	{
    97 	try{
    98 	load();
    99 	}catch(Exception e ){e.printStackTrace();}
    100 	this.port=hubPort;
    101 	this.hubhost=hubhost;
    102 	}
    103 	*/
    104 	public PluginImpl()
    105 	{
    106 	}
    107 	
    108 	
    109 	public void start() throws Exception {
    110 	
    111 	load();
    112 	listener = new StreamTaskListener(getLogFile());
    113 	File root = Hudson.getInstance().getRootDir();
    114 	
    115 	listener.getLogger().println("Checking Hub is connnected or not:"+IsHubHostConnected+":"+port);
    116 	// channel = createSeleniumGridVM(root, listener);
    117 	
    118 	// Hudson.getInstance().getActions().add(this);
    119 	} 
    çomputerListenerImpl.java
    Extension
    34 	public class ComputerListenerImpl extends ComputerListener implements Serializable {
    35 	/**
    36 	* Starts a selenium RC remotely.
    37 	*/
    38 	private String host_ip;
    39 	
    40 	private static boolean IsHubStarted=false;
    41 	
    42 	transient Channel HubChannel;
    43 	
    44 	public void onOnline(Computer c, final TaskListener listener) throws IOException, InterruptedException {
    45 	// SeleniumEnvironmentProperty env = c.getNode().getNodeProperties().get(SeleniumEnvironmentProperty.class);
    46 	// // launch RCs only for nodes that are configured accordingly
    47 	// if(env==null) {
    48 	// listener.getLogger().println("Selenium RC is disabled in configuration of this node. Skipping Selenium RC launch.");
    49 	// return;
    50 	// }
    51 	
    52 	final String HUB_HOST = Hudson.getInstance().getPlugin(PluginImpl.class).getHubhost();
    53 	final String HUB_PORT = Hudson.getInstance().getPlugin(PluginImpl.class).getPort();
    54 	
    55 	if(HUB_HOST==null) {
    56 	listener.getLogger().println("Unable to determine the host name of the master:"+HUB_HOST+". Skipping Selenium execution.");
    57 	return;
    58 	}
    59 	String hostName1 = getHostName(c, listener);
    60 	String host_name = c.getNode().getNodeName();
    61 	
    62 	if(hostName1==null)
    63 	{
    64 	InetAddress ia = InetAddress.getByName(host_name);
    65 	if(ia.isReachable(1000))
    66 	{
    67 	hostName1 = host_ip;
    68 	}
    69 	else
    70 	{
    71 	hostName1 = null;
    72 	}
    73 	}
    74 	final String hostName = hostName1;
    75 	
    76 	listener.getLogger().println("Rc hostname:"+hostName+"nodename:"+host_name);
    77 	
    78 	// if hostname is null, assign node name as hostname
    79 	listener.getLogger().println("Checking host name is not null:"+hostName);
    80 	
    81 	if(hostName==null) {
    82 	listener.getLogger().println("Unable to determine the host name:"+hostName+". Skipping Selenium execution.");
    83 	return;
    84 	}
    85 	final int masterPort = Hudson.getInstance().getPlugin(PluginImpl.class).getHubPort();
    86 	String hubName="";
    87 	final int nrc = c.getNumExecutors();
    88 	final StringBuilder labelList = new StringBuilder();
    89 	boolean IsHub=false,IsRC=false;
    90 	for(Label l : c.getNode().getAssignedLabels()) {
    91 	labelList.append('/');
    92 	labelList.append(l);
    93 	if(l.getName().equalsIgnoreCase("RC")) {
    94 	IsHub=false;
    95 	IsRC=true;
    96 	}
    97 	}
    98 	labelList.append('/');
    99 	
    100 	Set<Label> labels = c.getNode().getAssignedLabels();
    101 	for(Label l : labels)
    102 	{
    103 	if(l.getName().equalsIgnoreCase("RC"))
    104 	{
    105 	IsRC=true;
    106 	break;
    107 	}
    108 	}
    109 	listener.getLogger().println("Checking host name matches with the master:"+HUB_HOST+":"+hubName+" "+"hostName:"+hostName+"NodeName: "+c.getNode().getNodeName()+"isHubConnected:"+PluginImpl.IsHubHostConnected+IsHubStarted);
    110 	
    111 	//Start Grid only if Hostname or Node name matches with the Hubhostname and IsHubHostConnected is false
    112 	if(HUB_HOST.equals(hostName)|| HUB_HOST.equals(c.getNode().getNodeName())&&(PluginImpl.IsHubHostConnected==false))
    113 	{
    114 	listener.getLogger().println("Starting Selenium Hub..."+c.getNode().getRootPath()+HUB_HOST);
    115 	c.getNode().getRootPath().actAsync(new FileCallable<Object>() {
    116 	public Object invoke(File f, VirtualChannel channel) throws IOException {
    117 	try {
    118 	PluginImpl.createSeleniumGridVM(f,listener).callAsync(new HubLauncher(masterPort));
    119 	} catch (Exception t) {listener.getLogger().println("Hub failed");
    120 	throw new IOException2("Selenium Hub launch interrupted",t);
    121 	}
    122 	return null;
    123 	}
    124 	});
    125 	IsHubStarted=true;
    126 	PluginImpl.IsHubHostConnected=true;
    127 	listener.getLogger().println("Started Selenium Hub"+IsHubStarted+":"+PluginImpl.IsHubHostConnected);
    128 	Hudson.getInstance().getActions().add(Hudson.getInstance().getPlugin(PluginImpl.class));
    129 	}
    130 	// Start RC only if Label contains RC as a label string
    131 	if(IsRC==true) {
    132 	listener.getLogger().println("Starting Selenium RC");
    133 	c.getNode().getRootPath().actAsync(new FileCallable<Object>() {
    134 	public Object invoke(File f, VirtualChannel channel) throws IOException {
    135 	try {
    136 	for (int i=0; i<nrc; i++) {
    137 	// this is potentially unsafe way to figure out a free port number, but it's far easier
    138 	// than patching Selenium
    139 	ServerSocket ss = new ServerSocket(0);
    140 	int port = ss.getLocalPort();
    141 	ss.close();
    142 	PluginImpl.createSeleniumRCVM(f,listener).callAsync(new RemoteControlLauncher(
    143 	"-host",hostName,"-port",String.valueOf(port),"-env",labelList.toString(),"-hubURL","http://"+HUB_HOST+":"+HUB_PORT+"/"));
    144 	listener.getLogger().println("Started Selenium RC");
    145 	}
    146 	} catch (Exception t) {
    147 	throw new IOException2("Selenium RC launch interrupted",t);
    148 	}
    149 	return null;
    150 	}
    151 	});
    152 	}
    153 	} 

    1. Jun 29, 2010

      saravanakumar p says:

      It is fixed. It my bad, i assumed it started Hub on 4444 but actually it started...

      It is fixed. It my bad, i assumed it started Hub on 4444 but actually it started on 1193. i fixed it by assigning hub port to 4444

      1. Jul 01, 2010

        saravanakumar p says:

        now i am getting following error while running the test on grid: I tried on both...

        now i am getting following error while running the test on grid: I tried on both IE and firefox. I tried on selenium-server-1.0.3 and 1.0.5. firefox version is 3.5.9 client driver-1.0.1

        here is my code:

        SeleniumTest.java
        public class SeleniumTest {
            public static Selenium selenium;
                public static void main(String[] args){
        
                    try{
                        selenium = new DefaultSelenium("10.72.248.123", 4444, "RC:*iexplore"," http://news.yahoo.com");
        
                    selenium.start();
        
                    selenium.open("http://news.yahoo.com");
                    selenium.windowMaximize();
                    selenium.waitForPageToLoad("60000");
                    selenium.close();
                    selenium.stop();
                    }catch(Exception e)
                    {

        Error: In FF3
        22:29:30.563 INFO - Command request: getNewBrowserSession[*chrome, http://news.yahoo.com, ] on session
        22:29:30.563 INFO - creating new remote session
        22:29:30.688 INFO - Allocated session 8665bee1c1c841f7bb85b06af2363183 for http://news.yahoo.com, launching...
        22:30:35.329 INFO - Preparing Firefox profile...
        22:31:30.829 ERROR - Failed to start new browser session, shutdown browser and clear all session data
        java.lang.RuntimeException: Timed out waiting for profile to be created!
            at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.waitForFullProfileToBeCreated(FirefoxChromeLauncher.java:261)
            at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.populateCustomProfileDirectory(FirefoxChromeLauncher.java:119)
            at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launch(FirefoxChromeLauncher.java:96)
            at org.openqa.selenium.server.browserlaunchers.FirefoxChromeLauncher.launchRemoteSession(FirefoxChromeLauncher.java:310)
            at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:351)
            at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:119)
            at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:82)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:658)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:392)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:368)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:129)
            at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
            at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
            at org.mortbay.http.HttpServer.service(HttpServer.java:909)
            at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
            at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
            at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
            at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
            at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
            at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
        22:31:45.297 INFO - Got result: Failed to start new browser session: Error while launching browser on session null

        In IE

        22:43:54.344 INFO - Command request: getNewBrowserSession[*iehta, http://news.yahoo.com, ] on session null
        22:43:54.344 INFO - creating new remote session
        22:43:54.344 INFO - Allocated session cb3a5b10f1c344b2a8429a117e118d10 for http://news.yahoo.com, launching...
        22:44:17.407 INFO - Launching Embedded Internet Explorer...
        22:44:19.063 INFO - Launching Internet Explorer HTA...
        22:50:32.313 ERROR - Failed to start new browser session, shutdown browser and clear all session data
        org.openqa.selenium.server.RemoteCommandException: timed out waiting for window 'null' to appear
            at org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:565)
            at org.openqa.selenium.server.FrameGroupCommandQueueSet.waitForLoad(FrameGroupCommandQueueSet.java:522)
            at org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:352)
            at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:119)
            at org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:82)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:658)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:392)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:368)
            at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:129)
            at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
            at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
            at org.mortbay.http.HttpServer.service(HttpServer.java:909)
            at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
            at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
            at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
            at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
            at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
            at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
        22:50:32.344 WARN - Embedded iexplore seems to have ended on its own (did we kill the real browser???)
        22:50:36.063 INFO - Got result: Failed to start new browser session: Error while launching browser on session null

  10. Jul 15, 2010

    DPK says:

    Any updates to this plugin?  Selenium Grid is now at version 1.0.8 and this...

    Any updates to this plugin?  Selenium Grid is now at version 1.0.8 and this plugin uses 1.0.4.

    1. Jan 22, 2011

      Tatyana Tvardovskaya (aka salmira) says:

      Hi, my upgrade for Selenium plugin to use the complete Selenium Grid 1.0.8 is p...

      Hi,

      my upgrade for Selenium plugin to use the complete Selenium Grid 1.0.8 is posted as a patch to a new issue: http://issues.jenkins-ci.org/browse/JENKINS-8580

      Patch includes:

      1. Updates dependencies.
      2. Added intermediate packages for running maven to create the plugin
      3. Added some more helpful scripts for creation of distribution.
      4. Fixed plugin to use the complete Selenium Grid:
        1. use complete Selenium-grid-remote-control (removed the common httpclient dependencies)
        2. updated Selenium Grid Hub launcher to use add the newest feature of the Selenium Grid Hub (heartbeat: checking RC connection and un-registration of disconnected RCs from the list)

      This update works for me.

      Unfortunately, I failed to commit this patch to SVN myself because of an error:
      authorization failed: Could not authenticate to server: rejected Basic challenge (https://svn.java.net)

      Dear author, Kohsuke Kawaguchi,
      please use this patch and release a new plugin version!

      Thank you.

  11. Sep 13, 2010

    Jyothi Krishnan says:

    Hi, When I run the foll. python script, I get error 111 connection refused. En...

    Hi,

    When I run the foll. python script, I get error 111 connection refused.

    Environment:

    os: ubuntu karmic

    rc: python

    testconn.py:

    #!usr/bin/python
    from selenium import selenium
    host = "xx.xxx.x.xxx"
    port = "4444"
    browser = "*firefox"
    baseurl = "http://www.google.com"
    sel = selenium(host, port, browser, baseurl)
    sel.start()
    sel.open("/")
    sel.close()
    sel.stop()

    Error:Started by user anonymous
    Building on master
    [workspace] $ /bin/sh -xe /tmp/hudson2571341522573883531.sh
    + python /var/lib/hudson/jobs/Dashboard/workspace/hudson/testconn.py
    Traceback (most recent call last):
    File "/var/lib/hudson/jobs/Dashboard/workspace/hudson/testconn.py", line 11, in <module>
    sel.start()
    File "/var/lib/hudson/jobs/Dashboard/workspace/hudson/selenium.py", line 189, in start
    result = self.get_string("getNewBrowserSession", [self.browserStartCommand, self.browserURL, self.extensionJs])
    File "/var/lib/hudson/jobs/Dashboard/workspace/hudson/selenium.py", line 219, in get_string
    result = self.do_command(verb, args)
    File "/var/lib/hudson/jobs/Dashboard/workspace/hudson/selenium.py", line 207, in do_command
    conn.request("POST", "/selenium-server/driver/", body, headers)
    File "/usr/lib/python2.6/httplib.py", line 898, in request
    self._send_request(method, url, body, headers)
    File "/usr/lib/python2.6/httplib.py", line 935, in _send_request
    self.endheaders()
    File "/usr/lib/python2.6/httplib.py", line 892, in endheaders
    self._send_output()
    File "/usr/lib/python2.6/httplib.py", line 764, in _send_output
    self.send(msg)
    File "/usr/lib/python2.6/httplib.py", line 723, in send
    self.connect()
    File "/usr/lib/python2.6/httplib.py", line 704, in connect
    self.timeout)
    File "/usr/lib/python2.6/socket.py", line 514, in create_connection
    raise error, msg
    socket.error: [Errno 111] Connection refused
    Finished: FAILURE

  12. Sep 14, 2010

    Jyothi Krishnan says:

    Not sure what did the trick.  I just restarted my machine and I see my RCs ...

    Not sure what did the trick.  I just restarted my machine and I see my RCs error gone.  I see registered remote controls. But under selenium grid hub http:localhost:4444/console, I don't see anything listed under "Configured environments" and "Available Remote Controls".

  13. Sep 30, 2010

    Ed Hillmann says:

    Hi.  I have a question about migrating javascript that extends Selenium.&nb...

    Hi.  I have a question about migrating javascript that extends Selenium.  We've been using a single RC, which gets started in the same environment that is running the tests (using Java & TestNG).  When we start the Selenium Server, we pass it a javascript file that allows us to add a few extra locators, as Selenium allows you to do.  This is what we add to our Maven plugin that starts the Selenium Server (the <userExtensions> element is the bit that defines the custom javascript)     <execution>
        <!-- Start the selenium server. -->
        <id>start</id>
        <phase>pre-integration-test</phase>
        <goals>
            <goal>start-server</goal>
        </goals>
        <configuration>
            <avoidProxy>true</avoidProxy>
            <skip>$skip.start.selenium.server</skip>
            <userExtensions>$project.build.directory/selenium/user-extensions.js</userExtensions>
            <singleWindow>$selenium.single.window</singleWindow>
            <ensureCleanSession>true</ensureCleanSession>
            <background>true</background>
            <port>$selenium.port</port>
            <timeout>300</timeout> <!-- 5 minutes -->
            <logOutput>true</logOutput>
            <debug>$debug.selenium.server</debug>
        </configuration>
        </execution>

    If we were running the RCs manually, we'd pass this in.  I've just set up Hudson with the plugin (which is absolutely brilliant) and the hub is finding the slave node / RC just fine.  But when it goes to use a locator that depends on the Javascript contains within this extensions.js file, it fails because it can't find it.  Obviously, because it wasn't copied to it.

    Is there a way to configure Hudson to copy a javascript file to the slave node, when it's also copying over the selenium-server.jar, as well as including it when it starts the RC?  If not, is there a way of adding this manually to each site, so that the server is launched with the extensions.js accesible by the RC?

    Thanks for any info.  This is a big improvement over assembling this on its own.  I particular love how it starts the RC by default.  If I can't do this, however, I'm looking at trying to refactor my tests so they don't need this custom locator.  Which is a big job.

    1. Oct 25, 2010

      Ed Hillmann says:

      For anyone that cares, I raised an issue for supporting user extensions (http://...

      For anyone that cares, I raised an issue for supporting user extensions (http://issues.jenkins-ci.org/browse/JENKINS-7661). I've attached a patch against this issue which allows the Selenium Grid configuration on the Hudson Server to define user-extensions.js.  When the Selenium RC is deployed to the Hudson slaves, the user-extensions.js is deployed as well and the RC is started using the extensions.

      This has worked a treat for me so far.  To date, it hasnt been incorporated into the official plugin.

  14. Dec 29, 2010

    Daniel Tkatch says:

    Is possible and, if yes, is it documented somewhere how to pass additional argum...

    Is possible and, if yes, is it documented somewhere how to pass additional arguments (e.g. seleniumArgs) to the Selenium Remote Controls started on the slaves analogically to:

    ant -DseleniumArgs="-userExtensions /path/to/user-extensions.js -firefoxProfileTemplate /path/to/my_profile -singleWindow" launch-remote-control

  15. Oct 13, 2011

    sarnlaugsson says:

    I would love to see this plugin support Selenium Grid 2.x, there are some vital ...

    I would love to see this plugin support Selenium Grid 2.x, there are some vital upgrades since 1.x.

    1. Nov 04, 2011

      beng says:

      I would like to second the vote for Selenium Grid 2.x.  We're onto the new ...

      I would like to second the vote for Selenium Grid 2.x.  We're onto the new features and would really benefit from the RCs standing by on a Jenkins grid.  What can we do to help make this happen?  Thanks!

  16. Dec 27, 2011

    fizmatik says:

    Latest Release 2.0 Latest Release Date Dec 26, 2011 I don't see these changes i...

    Latest Release 2.0
    Latest Release Date Dec 26, 2011

    I don't see these changes in the plugin manager. No updates available and current version - 1.5. What's the problem?

    1. Dec 29, 2011

      fizmatik says:

      ok. It works from today. Thanks.

      ok. It works from today. Thanks.

  17. Jan 04, 2012

    sgibson says:

    Hi, I have the Selenium 2 plugin installed on my Jenkins 1.424.1 envir...

    Hi, I have the Selenium 2 plugin installed on my Jenkins 1.424.1 environment.  I've verified that the selenium jar process is running on the hub and each of the build nodes.  However, we're having problems when attempting to run a test.  The error message is as follows:  "status:13, "Error forwarding the new session new session request for webdriver should contain a location header with the session."  It looks like the "Location" value isn't being passed properly.

    One thing we noticed is that, if you look at the java processes on the nodes, the process' arguments don't indicate that they are pointing back to the hub.  Instead, they look like the following:

    "/usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin/java -cp /usr/bin/swarm-client-1.7-SNAPSHOT-jar-with-dependencies.jar hudson.remoting.Launcher -cp /var/build/selenium-server-standalone-2.15.0.jar -connectTo localhost:59236"

    The hubs process looks like this:

    /usr/lib/jvm/java-6-sun-1.6.0.26/jre/bin/java -cp /var/lib/tomcat6/webapps/jenkins/WEB-INF/lib/remoting-2.4.jar hudson.remoting.Launcher -cp /var/build/plugins/selenium/WEB-INF/lib/selenium-server-standalone-2.15.0.jar -connectTo localhost:44873

    Any help would be greatly appreciated!

    -Steve.

     

  18. Jan 31, 2012

    vijay_sfdc says:

    To test the Selenium grid plugin 2.0 and Chrome Driver plugin, I first upgraded ...

    To test the Selenium grid plugin 2.0 and Chrome Driver plugin, I first upgraded our Jenkins server to 1.449 and then added the plugin. Prior to the plugins being installed, the master had 3 slaves connected. On restarting the master the Selenium grid shows, and all the slaves went OFFLINE.

    Uninstalling/disabling the Chrome Driver plugin the slaves come back online.

    What is causing the slaves to go offline with Chrome Driver plugin? Any help appreciated.

    1. Mar 08, 2012

      mykhyggz says:

      Oh. My. Gaaaaah. Days lost to this. Remove chromedriver plugin and all windows s...

      Oh. My. Gaaaaah. Days lost to this. Remove chromedriver plugin and all windows slaves come on line.... and I don't even recall choosing to install it. Is it a dependency of the selenium plugin? If so, make that go away, please.

  19. Mar 05, 2012

    dermoritz says:

    I think i ran into one of this issues: http://code.google.com/p/selenium/issues...

    I think i ran into one of this issues:

    http://code.google.com/p/selenium/issues/detail?id=2362
    http://code.google.com/p/selenium/issues/detail?id=3366

    is it possible to update the plugin to a newer selenium server version (currently 2.15 is used)

  20. Mar 16, 2012

    iainrose says:

    I've got this working and am excited about the possibilities but also am in need...

    I've got this working and am excited about the possibilities but also am in need of a newer version of the Selenium server.

    I can see version 2.15 referenced in at least these 2 places, where else needs to be updated to get this working with v2.20?

    selenium-plugin / pom.xml

    selenium-plugin / install.sh 

    1. Mar 30, 2012

      dermoritz says:

      i simply took a new selenium server jar and renamed it to 2.15. then i replaced ...

      i simply took a new selenium server jar and renamed it to 2.15. then i replaced the one used by this plugin (i think it is libs folder?!) - thats working for me

    2. Mar 30, 2012

      dermoritz says:

      i simply took a new selenium server jar and renamed it to 2.15. then i replaced ...

      i simply took a new selenium server jar and renamed it to 2.15. then i replaced the one used by this plugin (i think it is libs folder?!) - thats working for me

      1. Apr 13, 2012

        bgottschalk says:

        I'm experimenting with simply replacing the jar with the latest in the way you d...

        I'm experimenting with simply replacing the jar with the latest in the way you describe.  Rename then replace.  Currently 2.21.  So far so good.  

        1. May 11, 2012

          iainrose says:

          Here's how to do it without renaming files. In the GitHub repo, you can see the...

          Here's how to do it without renaming files.

          In the GitHub repo, you can see the Selenium jar has been updated but v2.1 of the plugin has not yet been uploaded.

          https://github.com/jenkinsci/selenium-plugin/pull/10

          In the meantime, to update the plugin yourself

          1. Clone the GitHub repo

          2. In the project root run

          mvn install

          3. Find the generated plugin at ~/<project_root>/target/selenium.hpi

          4. Upload to Jenkins manually at Manage Jenkins > Manage Plugins > Advanced > Upload Plugin

          For future updates, note that only 3 updates were actually needed.

          https://github.com/jenkinsci/selenium-plugin/commit/cedfff38577df553397c6e047702d5bc46c762d9

          It should be simple to update this to v2.22, etc as they are released.

          1. Aug 02, 2012

            desperado says:

            Hi! I have did the same for 2.25 version but then the problem raises What ...

            Hi! I have did the same for 2.25 version

            but then the problem raises

            What have I did wrong?

            sh install.sh
            [INFO] Scanning for projects...
            [WARNING]
            [WARNING] Some problems were encountered while building the effective model for org.jenkins-ci.plugins:selenium:hpi:2.1-SNAPSHOT
            [WARNING] The expression $

            Unknown macro: {parent.version}

            is deprecated. Please use $

            Unknown macro: {project.parent.version}

            instead.
            [WARNING]
            [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
            [WARNING]
            [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
            [WARNING]
            [INFO]
            [INFO] ------------------------------------------------------------------------
            [INFO] Building Jenkins Selenium Plugin 2.1-SNAPSHOT
            [INFO] ------------------------------------------------------------------------
            [INFO]
            [INFO] — maven-deploy-plugin:2.5:deploy-file (default-cli) @ selenium —
            Uploading: http://repo.jenkins-ci.org/simple/releases/org/seleniumhq/selenium/selenium-server-standalone/2.25.0/selenium-server-standalone-2.25.0.jar
            Uploading: http://repo.jenkins-ci.org/simple/releases/org/seleniumhq/selenium/selenium-server-standalone/2.25.0/selenium-server-standalone-2.25.0.pom
            [INFO] ------------------------------------------------------------------------
            [INFO] BUILD FAILURE
            [INFO] ------------------------------------------------------------------------
            [INFO] Total time: 7:11.338s
            [INFO] Finished at: Thu Aug 02 12:57:32 GMT+02:00 2012
            [INFO] Final Memory: 40M/111M
            [INFO] ------------------------------------------------------------------------
            [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli) on project selenium: Failed to deploy artifacts: Could not transfer artifact org.seleniumhq.selenium:selenium-server-standalone:jar:2.25.0 from/to maven.jenkins-ci.org (http://repo.jenkins-ci.org/simple/releases/): Failed to transfer file: http://repo.jenkins-ci.org/simple/releases/org/seleniumhq/selenium/selenium-server-standalone/2.25.0/selenium-server-standalone-2.25.0.jar. Return code is: 401 -> [Help 1]
            [ERROR]
            [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
            [ERROR] Re-run Maven using the -X switch to enable full debug logging.
            [ERROR]
            [ERROR] For more information about the errors and possible solutions, please read the following articles:
            [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

  21. Apr 18, 2012

    dmaheshwari says:

    i am setting up to the jenkins (hudson) on linux environment .to run my selenium...

    i am setting up to the jenkins (hudson) on linux environment .to run my selenium script .

    So i configure a job in jenkins from which i am fetching code from svn and then i am starting selenium server and then invoking ant to run my scripts. but when i am running this job my selenium server get started inline but firefox is not getting launched.
    So i checked on the google they were saying to use Xvfb. I have installed Xvfb on Linux machine and download a xvfb plugin in jenkins
    And set up its configuration on Jenkins still my firefox is not getting launched.

    could you please help me how we use to configure Xvfb in jenkins and How this firefox launch problem can be resolved

  22. Apr 26, 2012

    dmeilinger says:

    Is anyone else getting something like the following error when trying to run a t...

    Is anyone else getting something like the following error when trying to run a test against the Plugin?  I have tried several fixes, none of which seem to be working.  If I kill Jenkins and bring up a Selenium 2.21 server my test runs fine.  I compared config between the instance I started manually and the Jenkins Plugin (http://myserver:4444/grid/console?config=true&configDebug=true) and the only real difference I found was capabilityMatcher : hudson.plugins.selenium.JenkinsCapabilityMatcher vs. the default org.openqa.grid.internal.utils.DefaultCapabilityMatcher, is this a possible issue? 

    org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find :

    Unknown macro: {platform=WINDOWS, ensureCleanSession=true, ignoreProtectedModeSettings=true, browserName=internet explorer, version=}

    Command duration or timeout: 282 milliseconds

    Build info: version: '2.20.0', revision: '16008', time: '2012-02-27 19:03:59'

    System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_23'

    Driver info: driver.version: RemoteWebDriver

    org.openqa.selenium.WebDriverException: Error forwarding the new session cannot find :

    Command duration or timeout: 282 milliseconds
    Build info: version: '2.20.0', revision: '16008', time: '2012-02-27 19:03:59'
    System info: os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_23'
    Driver info: driver.version: RemoteWebDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at ...

  23. Oct 13, 2012

    dirzhov says:

    How I can configure parameter -servlets for the hub?

    How I can configure parameter -servlets for the hub?

    1. May 20, 2013

      ssafyanbynd says:

      Go to the /configure page for jenkins. Under Selenium Click Advanced. All t...

      Go to the /configure page for jenkins. Under Selenium Click Advanced. All those settings should be there. Should these setting be more easily accessible/documented better? Yes they should. Thanks all

  24. Feb 13, 2013

    pavelaghababyan says:

    Hi, I try to install Jenkins Selenium plugin to setup Grid, but after installat...

    Hi,

    I try to install Jenkins Selenium plugin to setup Grid, but after installation Jenkins fails to start. 

    Bellow is the error from the logs which also appears on the Jenkins web page.

    Starting Selenium Grid nodes on 
    Testing hudson.plugins.selenium.configuration.global.SeleniumGlobalConfiguration@8abfa8e
    Starting hudson.plugins.selenium.configuration.global.SeleniumGlobalConfiguration@8abfa8e
    Feb 13, 2013 7:08:43 AM hudson.WebAppMain$2 run
    SEVERE: Failed to initialize Jenkins
    java.lang.NullPointerException at hudson.plugins.selenium.configuration.CustomRCConfiguration.initOptions(CustomRCConfiguration.java:196) at hudson.plugins.selenium.configuration.global.SeleniumGlobalConfiguration.getOptions(SeleniumGlobalConfiguration.java:66) at hudson.plugins.selenium.PluginImpl.startSeleniumNode(PluginImpl.java:527) at hudson.plugins.selenium.ComputerListenerImpl.onOnline(ComputerListenerImpl.java:26) at jenkins.model.Jenkins.<init>(Jenkins.java:846) at hudson.model.Hudson.<init>(Hudson.java:81) at hudson.model.Hudson.<init>(Hudson.java:77) at hudson.WebAppMain$2.run(WebAppMain.java:214)
    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop
    INFO: Stopping mailer
    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop
    INFO: Stopping external-monitor-job
    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop
    INFO: Stopping ldap
    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop
    INFO: Stopping pam-auth
    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop
    INFO: Stopping ant
    Feb 13, 2013 7:08:43 AM hudson.WebAppMain$2 run

    SEVERE: Failed to initialize Jenkins

    java.lang.NullPointerException

    at hudson.plugins.selenium.configuration.CustomRCConfiguration.initOptions(CustomRCConfiguration.java:196)

    at hudson.plugins.selenium.configuration.global.SeleniumGlobalConfiguration.getOptions(SeleniumGlobalConfiguration.java:66)

    at hudson.plugins.selenium.PluginImpl.startSeleniumNode(PluginImpl.java:527)

    at hudson.plugins.selenium.ComputerListenerImpl.onOnline(ComputerListenerImpl.java:26)

    at jenkins.model.Jenkins.<init>(Jenkins.java:846)

    at hudson.model.Hudson.<init>(Hudson.java:81)

    at hudson.model.Hudson.<init>(Hudson.java:77)

    at hudson.WebAppMain$2.run(WebAppMain.java:214)

    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop

    INFO: Stopping mailer

    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop

    INFO: Stopping external-monitor-job

    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop

    INFO: Stopping ldap

    Feb 13, 2013 7:08:44 AM hudson.PluginWrapper stop

    INFO: Stopping pam-auth

    After this, when I physically remove selenium forlder and selenium.hpi from the file system then jenkins starts properly.
    Could you please advice how to fix this issue.?
    Thanks,
    Pavel

  25. Apr 16, 2013

    babyroot says:

    Hi all! Configured to Jenkins hub with a plugin, tests on a remote machine ...

    Hi all!

    Configured to Jenkins hub with a plugin, tests on a remote machine with WinXP run good.

    If the node is enabled on the remote Win8-machine:


    - starts good, test strats good.

    But, on the hub in console error -

    HTTP ERROR: 500
    
    Problem accessing /grid/console. Reason:
    
        No enum constant org.openqa.selenium.Platform.WIN8

    Selenium version 2.32

    Does anyone know how to solve this problem?

    And one problem.

    Why running hub grid informs 2.25 version (You are using grid 2.25.0), if on the server is in the Maven repository is only 2.32 version?

    1. Apr 17, 2013

      babyroot says:

      The problem is solved. Together with the plugin was downloaded the old server. I...

      The problem is solved.
      Together with the plugin was downloaded the old server.
      It is located at
      The problem is solved.

      Together with the plugin was downloaded the old server.

      It is located at

      /local/jenkins/plugins/selenium/WEB-INF/lib/

      Upgraded to the latest version of the server and it worked.

  26. Jun 10, 2013

    jvanbouchaute says:

    We're using both Chrome & IE webdriver configurations with this plugin. On ...

    We're using both Chrome & IE webdriver configurations with this plugin.

    On the Selenium grid slave nodes, chromedriver does logging to a file, IEDriverServer does not by default.

    How can accomplish that the IEDriverServer on the Jenkins slave machine, logs to a file (and specify a log level)  using this plugin ?

    Thx.

    Jurgen