Setup of project in web driver

648 views
555 views

Published on

Open eclipse
¨> Right click on Package Explorer > New > Java Project
¨> Give a Project name and click Next
¨> Go to Selenium downloads page and download Java Language bindings
¨> Extract it in your local drive
¨> Right Click in your project > Properties
¨> Java Build Path > Libraries
¨> Click “Add Library..” button and add JAR files (include files in “libs” folder)
¨> After import JAR files, you can see “Referenced Libraries” folder

Published in: Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
648
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Setup of project in web driver

  1. 1. Raghav Arora : aroraglobalservices.blogspot.com 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 March 28, 2014 2 How to Configure Selenium WebDriver (Java) |Raghav Arora aroraglobalservices.blogspot.co m
  3. 3. Create a Project  Open eclipse  Right click on Package Explorer > New > Java Project March 28, 2014 3 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  4. 4. Create a Project  Give a Project name and click Next March 28, 2014 4 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  5. 5. Create a Project  Go to Selenium downloads page and download Java Language bindings  Extract it in your local drive March 28, 2014 5 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  6. 6. Create a Project  Right Click in your project > Properties March 28, 2014 6 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  7. 7. Create a Project  Java Build Path > Libraries March 28, 2014 7 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  8. 8. Create a Project  Click “Add Library..” button and add JAR files (include files in “libs” folder) March 28, 2014 8 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  9. 9. Create a Project  After import JAR files, you can see “Referenced Libraries” folder March 28, 2014 9 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  10. 10. Configure Firefox  Create new class file and enter following code March 28, 2014 10 How to Configure Selenium WebDriver (Java) | Raghav Arora 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 aroraglobalservices.blogspot.co m
  11. 11. Configure Firefox  Google opens through Firefox March 28, 2014 11 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  12. 12. Configure Chrome  Download chrome driver from selenium download page third party section and extract it March 28, 2014 12 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  13. 13. Configure Chrome  Enter following code March 28, 2014 13 How to Configure Selenium WebDriver (Java) | Raghav Arora 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 aroraglobalservices.blogspot.co m
  14. 14. Configure Chrome  Google opens through Chrome March 28, 2014 14 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  15. 15. Configure Internet Explorer  Download Internet Explorer (IE) driver from selenium download page and extract it. March 28, 2014 15 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  16. 16. Configure Internet Explorer  Enter following code March 28, 2014 16 How to Configure Selenium WebDriver (Java) | Raghav Arora 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 aroraglobalservices.blogspot.co m
  17. 17. Configure Internet Explorer  Google opens through IE March 28, 2014 17 How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m
  18. 18. Code : Cross Browser  Complete code March 28, 2014 18 How to Configure Selenium WebDriver (Java) | Dasun Eranthika aroraglobalservices.blogspot.co m
  19. 19. 19 “Back to Journey..” I’m on…. March 28, 2014How to Configure Selenium WebDriver (Java) | Raghav Arora aroraglobalservices.blogspot.co m

×