Created
November 17, 2012 00:39
-
-
Save fijiaaron/4092214 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
import org.openqa.selenium.WebDriver; | |
import org.openqa.selenium.WebDriverBackedSelenium; | |
import org.openqa.selenium.firefox.FirefoxDriver; | |
import com.thoughtworks.selenium.Selenium; | |
public class SeleniumCheckboxExample { | |
public static void main(String[] args) | |
{ | |
WebDriver driver = new FirefoxDriver(); | |
String baseUrl = "http://assets-portal.com/"; | |
Selenium selenium = new WebDriverBackedSelenium(driver, baseUrl); | |
selenium.open("/"); | |
String serviceOfficesCheckbox = "name=c1"; | |
if (selenium.getValue(serviceOfficesCheckbox) == "off") | |
{ | |
selenium.check(serviceOfficesCheckbox); | |
} | |
//selenium.stop(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment