Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Dasun Eranthika
How to Configure Selenium WebDriver (Java)
1
Content
 Create a Project
 Configure Firefox
 Configure Chrome
 Configure Internet Explorer
 You must pre-download ec...
Create a Project
 Open eclipse
 Right click on Package Explorer > New > Java Project
September 17, 2013
3
How to Configu...
Create a Project
 Give a Project name and click Next
September 17, 2013
4
How to Configure Selenium WebDriver (Java) | Da...
Create a Project
 Go to Selenium downloads page and download Java Language
bindings
 Extract it in your local drive
Sept...
Create a Project
 Right Click in your project > Properties
September 17, 2013
6
How to Configure Selenium WebDriver (Java...
Create a Project
 Java Build Path > Libraries
September 17, 2013
7
How to Configure Selenium WebDriver (Java) | Dasun Era...
Create a Project
 Click “Add Library..” button and add JAR files (include files in “libs”
folder)
September 17, 2013
8
Ho...
Create a Project
 After import JAR files, you can see “Referenced Libraries” folder
September 17, 2013
9
How to Configure...
Configure Firefox
 Create new class file and enter following code
September 17, 2013
10
How to Configure Selenium WebDriv...
Configure Firefox
 Google opens through Firefox
September 17, 2013
11
How to Configure Selenium WebDriver (Java) | Dasun ...
Configure Chrome
 Download chrome driver from selenium download page third party
section and extract it
September 17, 201...
Configure Chrome
 Enter following code
September 17, 2013
13
How to Configure Selenium WebDriver (Java) | Dasun Eranthika...
Configure Chrome
 Google opens through Chrome
September 17, 2013
14
How to Configure Selenium WebDriver (Java) | Dasun Er...
Configure Internet Explorer
 Download Internet Explorer (IE) driver from selenium download
page and extract it.
September...
Configure Internet Explorer
 Enter following code
September 17, 2013
16
How to Configure Selenium WebDriver (Java) | Dasu...
Configure Internet Explorer
 Google opens through IE
September 17, 2013
17
How to Configure Selenium WebDriver (Java) | D...
 Complete code
September 17, 2013
18
How to Configure Selenium WebDriver (Java) | Dasun Eranthika
19
“Back to Journey..”
I’m in….
September 17, 2013How to Configure Selenium WebDriver (Java) | Dasun Eranthika
Upcoming SlideShare
Loading in …5
×

How to Configure Selenium WebDriver (java)

6,551 views

Published on

This slide explains how to configure selenium webdriver to firefox, chrome and IE browsers using java (with screenshots).

Published in: Technology, News & Politics
  • Be the first to comment

How to Configure Selenium WebDriver (java)

  1. 1. Dasun Eranthika How to Configure Selenium WebDriver (Java) 1
  2. 2. Content  Create a Project  Configure Firefox  Configure Chrome  Configure Internet Explorer  You must pre-download eclipse September 17, 2013 2 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  3. 3. Create a Project  Open eclipse  Right click on Package Explorer > New > Java Project September 17, 2013 3 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  4. 4. Create a Project  Give a Project name and click Next September 17, 2013 4 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  5. 5. Create a Project  Go to Selenium downloads page and download Java Language bindings  Extract it in your local drive September 17, 2013 5 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  6. 6. Create a Project  Right Click in your project > Properties September 17, 2013 6 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  7. 7. Create a Project  Java Build Path > Libraries September 17, 2013 7 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  8. 8. Create a Project  Click “Add Library..” button and add JAR files (include files in “libs” folder) September 17, 2013 8 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  9. 9. Create a Project  After import JAR files, you can see “Referenced Libraries” folder September 17, 2013 9 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  10. 10. Configure Firefox  Create new class file and enter following code September 17, 2013 10 How to Configure Selenium WebDriver (Java) | Dasun Eranthika import org.openqa.selenium.firefox.FirefoxDriver; public class Uers { public static void main(String[] args) { FirefoxDriver fd = new FirefoxDriver(); fd.get("http:/google.lk"); } } Site URL
  11. 11. Configure Firefox  Google opens through Firefox September 17, 2013 11 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  12. 12. Configure Chrome  Download chrome driver from selenium download page third party section and extract it September 17, 2013 12 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  13. 13. Configure Chrome  Enter following code September 17, 2013 13 How to Configure Selenium WebDriver (Java) | Dasun Eranthika import org.openqa.selenium.chrome.ChromeDriver; public class Uers { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver", "C:Seleniumchromedriver.exe"); ChromeDriver cd= new ChromeDriver(); cd.get("http://google.lk"); } } Site URL Location of chromedriver
  14. 14. Configure Chrome  Google opens through Chrome September 17, 2013 14 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  15. 15. Configure Internet Explorer  Download Internet Explorer (IE) driver from selenium download page and extract it. September 17, 2013 15 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  16. 16. Configure Internet Explorer  Enter following code September 17, 2013 16 How to Configure Selenium WebDriver (Java) | Dasun Eranthika import org.openqa.selenium.ie.InternetExplorerDriver; public class Uers { public static void main(String[] args) { System.setProperty("webdriver.ie.driver", "C:SeleniumIEDriverServer.exe"); InternetExplorerDriver id= new InternetExplorerDriver(); id.get("http://google.lk"); } } Site URL Location of IEdriver
  17. 17. Configure Internet Explorer  Google opens through IE September 17, 2013 17 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  18. 18.  Complete code September 17, 2013 18 How to Configure Selenium WebDriver (Java) | Dasun Eranthika
  19. 19. 19 “Back to Journey..” I’m in…. September 17, 2013How to Configure Selenium WebDriver (Java) | Dasun Eranthika

×