View Javadoc

1   package com.atlassian.pageobjects.elements;
2   
3   import com.atlassian.pageobjects.elements.timeout.TimeoutType;
4   import org.openqa.selenium.By;
5   
6   /**
7    * Implementation of (@Link CheckboxElement)
8    */
9   public class WebDriverCheckboxElement extends WebDriverElement implements  CheckboxElement
10  {
11      public WebDriverCheckboxElement(By locator)
12      {
13          super(locator);
14      }
15  
16      public WebDriverCheckboxElement(By locator, TimeoutType defaultTimeout)
17      {
18          super(locator, defaultTimeout);
19      }
20  
21      public WebDriverCheckboxElement(WebDriverLocatable locatable, TimeoutType timeoutType)
22      {
23          super(locatable, timeoutType);
24      }
25  
26      public WebDriverCheckboxElement(By locator, WebDriverLocatable parent)
27      {
28          super(locator, parent);
29      }
30  
31      public WebDriverCheckboxElement(By locator, WebDriverLocatable parent, TimeoutType timeoutType)
32      {
33          super(locator, parent, timeoutType);
34      }
35  
36      public CheckboxElement check()
37      {
38          select();
39          return this;
40      }
41  
42      public CheckboxElement uncheck()
43      {
44          if(isSelected())
45          {
46              toggle();
47          }
48          return this;
49      }
50  }