0

I'm trying to migrate to webdriver, as it is faster. How do I do this? Currently I'm using the setUp() command for selenium. Do I need to add any new jar files for the webdriver?

Arka
  • 35
  • 2
  • 9
  • This needs much more information. How do the RC tests work? What testing framework do you use? JUnit? How many tests? What browsers? – Arran Oct 15 '12 at 09:26
  • Provide us more details so that we could get back to you with some definite answers. – Abhishek_Mishra Oct 15 '12 at 09:40
  • Ok, so I use Junit. There is one test, which accesses an excel file full of testcases. I use firefox 12.0. I launch a standalone selenium server using this command: – Arka Oct 15 '12 at 09:45
  • java.exe -jar selenium-server-standalone-2.22.0.jar -browserSessionReuse -firefoxProfileTemplate E:\Automation\profile – Arka Oct 15 '12 at 09:45
  • see this post from me. http://stackoverflow.com/questions/12807689/selenium-vs-htmlunit/12824981#12824981 – eugene.polschikov Oct 15 '12 at 11:34

1 Answers1

0

I 'd like to describe in common features approach I use on my project. I'm using selenium webDriver. Working on java. IDE: IDEA. build manager: maven.

So I got POM.xml file. So I simply add there depencdencies in POM xml:

<dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.4</version>
      </dependency>

      <dependency> <groupId>org.seleniumhq.selenium</groupId>
          <artifactId>selenium-java</artifactId>
          <version>2.24.1</version>
      </dependency>

On building the project maven will get needed jars automatically.

In my project I got BaseSeleniumTest.java: with the following:

public class BaseSeleniumTest extends SeleneseTestBase {
    static WebDriver driver;



    @BeforeClass
    public static void firefoxSetUp() throws MalformedURLException {


        driver = new FirefoxDriver();  
    }
    @Before
    public void homePageRefresh() throws IOException {
        driver.get("login.base.url");
    }


    @AfterClass
    public static void closeFirefox(){
        driver.quit();
    }
...
}

And have some other classes inherinting from BaseSekeniumTest.java where I describe pack of my selenium tests annotated by @Test That's kind of structure on my project.

Hope this helps you.

eugene.polschikov
  • 7,254
  • 2
  • 31
  • 44