Official Selenium Blog

January 25, 2011

2.0b1 and Maven

Filed under: Uncategorized — shs96c @ 11:24 am UTC

If you’re using Maven and the 2.0b1 release of Selenium, you may be running into some problems getting maven to pick up your tests. The underlying problem is that selenium contains support classes for both JUnit and TestNG. The solution is to add this to your pom.xml

<dependency>
  <groupId>org.seleniumhq.selenium</groupId>
  <artifactId>selenium</artifactId>
  <version>2.0b1</version>
  <exclusions>
    <exclusion>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
    </exclusion>
  </exclusions>
</dependency>

2 Comments »

  1. Eeek! This is an ugly hack😦 Any hopes it will be fixed before next beta?

    Comment by Antti Andreimann — February 4, 2011 @ 3:48 pm UTC | Reply

  2. An interesting fact is that when I pull in individual drivers like this:

    org.seleniumhq.selenium
    selenium-firefox-driver
    2.0b1

    Maven has no trouble finding the tests.

    Comment by Antti Andreimann — February 4, 2011 @ 3:50 pm UTC | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: