Skip to content

Instantly share code, notes, and snippets.

@4M01
Created September 25, 2016 08:46
Show Gist options
  • Save 4M01/01a353d7de2eae8dcb20603ebf893934 to your computer and use it in GitHub Desktop.
Save 4M01/01a353d7de2eae8dcb20603ebf893934 to your computer and use it in GitHub Desktop.
Getting started with WebDriver. Your first Selenium Script
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class FirstScript {
public static void main(String args[]){
WebDriver driver = new FirefoxDriver();
driver.get("http://qaperspective.blogspot.in/p/step-by-step-selenium-guide-this.html");
String titleOfBlog = driver.getTitle();
System.out.println("Title - " + titleOfBlog);
driver.close();
driver.quit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment