Using Selenium Webdriver with Java

Other topics

Opening browser window with specific URL using Selenium Webdriver in Java

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

class test_webdriver{
    public static void main(String[] args) {
       WebDriver driver = new FirefoxDriver();
       driver.get("http://stackoverflow.com/");
       driver.close();
    }
}

Opening a browser window with to() method

Opening a browser with to() method.

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
class navigateWithTo{
    public static void main(String[] args) {
       WebDriver driver = new FirefoxDriver();
       driver.navigate().to("http://www.example.com");
       driver.close();
    }
}

Contributors

Topic Id: 9158

Example Ids: 28438,29623

This site is not affiliated with any of the contributors.