Created
July 2, 2014 06:10
-
-
Save hatena-iti/decabf420df453bbe57d to your computer and use it in GitHub Desktop.
This file contains 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
package jp.co.iti.test; | |
import junit.framework.Assert; | |
import io.selendroid.SelendroidCapabilities; | |
import io.selendroid.SelendroidDriver; | |
import org.junit.After; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.openqa.selenium.By; | |
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebElement; | |
import org.openqa.selenium.remote.DesiredCapabilities; | |
public class SelendroidTest { | |
private WebDriver driver = null; | |
@Test | |
public void inputField() { | |
WebElement inputField = driver.findElement(By.id("my_text_field")); | |
Assert.assertEquals("true", inputField.getAttribute("enabled")); | |
inputField.sendKeys("Selendroid"); | |
Assert.assertEquals("Selendroid", inputField.getText()); | |
driver.quit(); | |
} | |
@Before | |
public void setup() throws Exception { | |
DesiredCapabilities caps = new SelendroidCapabilities("io.selendroid.testapp:0.10.0"); | |
driver = new SelendroidDriver(caps); | |
} | |
@After | |
public void teardown() { | |
if (driver != null) { | |
driver.quit(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment