Code and Commands
Code and Commands
1.Setting Up Hub:
java -jar selenium-server-standalone-2.44.0.jar -role hub
http://localhost:4444/grid/console
http://iporhostnameofHub:4444/grid/console
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.concurrent.TimeUnit;
import org.junit.Test;
import org.openqa.selenium.Platform;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
WebDriver driver;
System.out.println(driver.getTitle());