Skip to content

Instantly share code, notes, and snippets.

@devops-school
Last active September 26, 2019 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devops-school/457ba325618ba77acab950b8fbc1c7b2 to your computer and use it in GitHub Desktop.
Save devops-school/457ba325618ba77acab950b8fbc1c7b2 to your computer and use it in GitHub Desktop.
Demo for Selenium ChromeDriver wordpress
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
/**
* @author Nils Schuette via frontendtest.org
*/
public class RunTest {
static WebDriver webDriver;
/**
* @param args
* @throws InterruptedException
*/
public static void main(final String[] args) throws InterruptedException {
// Telling the system where to find the chrome driver
System.setProperty(
"webdriver.chrome.driver",
"C:/PATH/TO/chromedriver.exe");
// Open the Chrome browser
webDriver = new ChromeDriver();
// Waiting a bit before closing
Thread.sleep(7000);
// Closing the browser and WebDriver
webDriver.close();
webDriver.quit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment