Created
November 16, 2012 15:09
-
-
Save xhawk/4088036 to your computer and use it in GitHub Desktop.
Selenium Grid test with IE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>seleniumIE</groupId> | |
<artifactId>seleniumIE</artifactId> | |
<version>1.0</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.seleniumhq.selenium</groupId> | |
<artifactId>selenium-java</artifactId> | |
<version>2.26.0</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.seleniumhq.selenium</groupId> | |
<artifactId>selenium-ie-driver</artifactId> | |
<version>2.26.0</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>org.seleniumhq.selenium</groupId> | |
<artifactId>selenium-remote-driver</artifactId> | |
<version>2.26.0</version> | |
<scope>test</scope> | |
</dependency> | |
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.9</version> | |
</dependency> | |
</dependencies> | |
</project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.Before; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
import org.openqa.selenium.remote.RemoteWebDriver; | |
import java.net.URL; | |
public class SeleniumIETest { | |
private RemoteWebDriver driver; | |
@Before | |
public void setUp() throws Exception { | |
DesiredCapabilities capability = DesiredCapabilities.internetExplorer(); | |
driver = new RemoteWebDriver(new URL(String.format("http://ci.proactum.fi:4444/wd/hub")), capability); | |
} | |
@Test | |
public void test() { | |
driver.get("www.google.com"); | |
driver.findElement(By.name("q")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment