Raizekas

Untitled

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