Home >Technology >How to Configure Selenium WebDriver (java)

How to Configure Selenium WebDriver (java)

Date post:20-Aug-2015
Category:
View:5,212 times
Download:1 times
Share this document with a friend
Transcript:
  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.. Im in. September 17, 2013How to Configure Selenium WebDriver (Java) | Dasun Eranthika
Popular Tags:
of 19/19
Dasun Eranthika How to Configure Selenium WebDriver (Java) 1
Embed Size (px)
Recommended