package com.atlassian.pageobjects.elements.test;

import com.atlassian.pageobjects.elements.CheckboxElement;
import com.atlassian.pageobjects.elements.ElementFinder;
import com.atlassian.pageobjects.elements.test.pageobjects.page.ElementsPage;
import org.junit.Test;
import org.openqa.selenium.By;

import static junit.framework.Assert.assertFalse;
import static junit.framework.Assert.assertTrue;

public class TestCheckboxElement extends AbstractFileBasedServerTest
{
    @Test
    public void testCheck()
    {
        ElementFinder elementFinder = product.getPageBinder().bind(ElementFinder.class);
        product.visit(ElementsPage.class);

        CheckboxElement element1 = elementFinder.find(By.id("test8_checkbox1"), CheckboxElement.class);
        CheckboxElement element2 = elementFinder.find(By.id("test8_checkbox2"), CheckboxElement.class);

        assertFalse(element1.isSelected());
        assertTrue(element2.isSelected());

        element1.check();
        element2.check();

        assertTrue(element1.isSelected());
        assertTrue(element2.isSelected());
    }

    @Test
    public void testUncheck()
    {
         ElementFinder elementFinder = product.getPageBinder().bind(ElementFinder.class);
        product.visit(ElementsPage.class);

        CheckboxElement element1 = elementFinder.find(By.id("test8_checkbox1"), CheckboxElement.class);
        CheckboxElement element2 = elementFinder.find(By.id("test8_checkbox2"), CheckboxElement.class);

        assertFalse(element1.isSelected());
        assertTrue(element2.isSelected());

        element1.uncheck();
        element2.uncheck();

        assertFalse(element1.isSelected());
        assertFalse(element2.isSelected());
    }
}

@@ -147,16 +147,20 @@
 lements.
+Page
 ElementF
@@ -527,32 +527,36 @@
 %0A    %7B%0D%0A        
+Page
 ElementFinder el
@@ -590,32 +590,36 @@
 geBinder().bind(
+Page
 ElementFinder.cl
@@ -1184,17 +1184,20 @@
         
- 
+Page
 ElementF
@@ -1247,16 +1247,20 @@
 ().bind(
+Page
 ElementF

Fix for rename of ElementFinder