For YouTube Video Click here
package day1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class FirstScript {
public static void main(String[] args) {
// Set the Path of Executable Browser Driver
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\mprem\\OneDrive\\Desktop\\SelJars\\chromedriver_win32 (1)\\chromedriver.exe");
WebDriver driver=new ChromeDriver(); //Parent p=new Child (WebDriver is Parent & ChromeDriver is Child)
driver.get("http://selenium.dev"); // opening url
System.out.println(driver.getTitle()); //Printing title
driver.quit(); //closing browser
}
}
Comments
Post a Comment