Day1

package launchBrowser;
 
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
 
public class Day1_LaunchChrome {
 
static WebDriver driver;
 
public static void main(String[] args) throws Exception {
 
System.setProperty("webdriver.chrome.driver", "G:\\Lib\\chromedriver.exe");
driver = new ChromeDriver();
 
driver.manage().window().maximize();
 
driver.get("https://www.google.com");
 
driver.findElement(By.name("q")).sendKeys("techlearn.in");
 
Thread.sleep(3000);
 
driver.findElement(By.name("q")).sendKeys(Keys.ENTER);
 
// driver.findElement(By.name("btnK")).click();
 
 
 
 
/*
driver.navigate().to("https://www.facebook.com");
 
driver.navigate().back();
 
driver.navigate().forward();
 
driver.navigate().refresh();
 
*/
 
 
 
/*
  Multi Line Comment
*/
 
// Single Line Comment
 
// driver.close();
 
// driver.quit();
 
 
}
 
}