Advertisement
rahat62

Base for Automation

Oct 7th, 2022
863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. package automation.warcart;
  2.  
  3. import java.util.concurrent.TimeUnit;
  4.  
  5. import org.openqa.selenium.WebDriver;
  6. import org.openqa.selenium.chrome.ChromeDriver;
  7.  
  8. public class Base {
  9.    
  10.     public static WebDriver getDriver() {
  11.        
  12.         //loading chrome driver from the folder
  13.         System.setProperty("webdriver.chrome.driver","c:\\chromedriver.exe");
  14.         WebDriver driver = new ChromeDriver();
  15.        
  16.         driver.manage().window().maximize();
  17.        
  18.         // giving the time value.
  19.         driver.manage().timeouts().implicitlyWait(7, TimeUnit.SECONDS);
  20.         return driver;
  21.     }
  22.  
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement