Skip to content

Instantly share code, notes, and snippets.

@fijiaaron
Created November 17, 2012 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fijiaaron/4092214 to your computer and use it in GitHub Desktop.
Save fijiaaron/4092214 to your computer and use it in GitHub Desktop.
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