Sunday 27 April 2014

Selenium WebDriver


Step 1 - Sisteminizde Java JDK kurulu olmalidir  (Download and install Java in your system)



Step 2 - Eclipse kurulu olmalidir (Download eclipse from here)



Step 3 - Selenium Java Client download edilmelidir (Download Selenium Java Client)



Step 4 - Jar dosyasi extract edilir (libs ve diger 2 tane jar dosyasi projeye import edilmelidir.)



Step 5 - Eclipse java projesi yaratilir. (Create java project)


Step 6 - Jar dosyalari proje ye import edilir.


Step 7 - Test class i olusturulur

package test;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class TestClass {
  
    public static void main(String[] args) {
     
        //Here we initialize the firefox webdriver
        WebDriver firefoxDriver=new FirefoxDriver();
     
        //Open the url which we want in firefox
        firefoxDriver.get("Http://www.google.com");

    }
}


Step 8 - Aşağıdaki firefox ta google.com açılmalıdır.