|
20 | 20 | import static org.hamcrest.Matchers.is;
|
21 | 21 | import static org.junit.Assert.assertThat;
|
22 | 22 | import static org.junit.Assert.assertTrue;
|
| 23 | +import static org.openqa.selenium.testing.Driver.HTMLUNIT; |
| 24 | +import static org.openqa.selenium.testing.Driver.MARIONETTE; |
23 | 25 |
|
24 | 26 | import org.junit.Test;
|
25 | 27 | import org.openqa.selenium.testing.JUnit4TestBase;
|
| 28 | +import org.openqa.selenium.testing.NotYetImplemented; |
26 | 29 |
|
27 | 30 | import java.util.List;
|
28 | 31 |
|
@@ -126,4 +129,32 @@ public void testCanSelectFromMultipleSelectWhereValueIsBelowVisibleRange() {
|
126 | 129 | option.click();
|
127 | 130 | assertThat(option.isSelected(), is(true));
|
128 | 131 | }
|
| 132 | + |
| 133 | + @Test |
| 134 | + @NotYetImplemented(MARIONETTE) |
| 135 | + public void testCannotSetDisabledOption() { |
| 136 | + driver.get(pages.selectPage); |
| 137 | + WebElement element = driver.findElement(By.cssSelector("#visibility .disabled")); |
| 138 | + element.click(); |
| 139 | + assertTrue("Expected to not be selected", !element.isSelected()); |
| 140 | + } |
| 141 | + |
| 142 | + @Test |
| 143 | + @NotYetImplemented(HTMLUNIT) |
| 144 | + public void testCanSetHiddenOption() { |
| 145 | + driver.get(pages.selectPage); |
| 146 | + WebElement element = driver.findElement(By.cssSelector("#visibility .hidden")); |
| 147 | + element.click(); |
| 148 | + assertTrue("Expected to be selected", element.isSelected()); |
| 149 | + } |
| 150 | + |
| 151 | + @Test |
| 152 | + @NotYetImplemented(HTMLUNIT) |
| 153 | + public void testCanSetInvisibleOption() { |
| 154 | + driver.get(pages.selectPage); |
| 155 | + WebElement element = driver.findElement(By.cssSelector("#visibility .invisible")); |
| 156 | + element.click(); |
| 157 | + assertTrue("Expected to be selected", element.isSelected()); |
| 158 | + } |
| 159 | + |
129 | 160 | }
|
0 commit comments