Raizekas

Untitled

Apr 8th, 2021
35
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package config;
  2.  
  3. import org.openqa.selenium.WebDriver;
  4. import org.openqa.selenium.chrome.ChromeDriver;
  5. import org.openqa.selenium.edge.EdgeDriver;
  6. import org.openqa.selenium.firefox.FirefoxDriver;
  7.  
  8. public class SeleniumValdymas
  9. {
  10. private WebDriver driver;
  11.  
  12. public WebDriver initChromeDriver()
  13. {
  14. System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe");
  15. driver = new ChromeDriver();
  16. return driver;
  17. }
  18.  
  19. public WebDriver initFirefoxDriver()
  20. {
  21. System.setProperty("webdriver.gecko.driver","C:\\geckodriver.exe");
  22. driver = new FirefoxDriver();
  23. return driver;
  24. }
  25.  
  26. public WebDriver initEdgeDriver()
  27. {
  28. System.setProperty("webdriver.edge.driver", "C:\\EdgeDriver.exe");
  29. driver = new EdgeDriver();
  30. return driver;
  31. }
  32. }
  33.  
RAW Paste Data