Raizekas

Untitled

Apr 8th, 2021
42
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. import org.openqa.selenium.support.ui.WebDriverWait;
  8.  
  9. public class SeleniumValdymas
  10. {
  11. private WebDriver driver;
  12. private WebDriverWait wait;
  13.  
  14.  
  15. public WebDriverWait initDesimtSekundziu()
  16. {
  17. wait = new WebDriverWait(driver, 10);
  18. return wait;
  19. }
  20.  
  21.  
  22. public WebDriver initChromeDriver()
  23. {
  24. System.setProperty("webdriver.chrome.driver", "C:\\chromedriver.exe");
  25. driver = new ChromeDriver();
  26. return driver;
  27. }
  28.  
  29. public WebDriver initFirefoxDriver()
  30. {
  31. System.setProperty("webdriver.gecko.driver","C:\\geckodriver.exe");
  32. driver = new FirefoxDriver();
  33. return driver;
  34. }
  35.  
  36. public WebDriver initEdgeDriver()
  37. {
  38. System.setProperty("webdriver.edge.driver", "C:\\EdgeDriver.exe");
  39. driver = new EdgeDriver();
  40. return driver;
  41. }
  42. }
  43.  
RAW Paste Data