use of org.definitylabs.flue2ent.element.WebElementWrapper in project flue2ent by DefinityLabs.
the class SelectElementTest method selectByIndex_callsSelectByIndex.
@Test
public void selectByIndex_callsSelectByIndex() {
int index = 1;
SelectElement selectElement = new SelectElement(new WebElementWrapper(webElement));
SelectElement result = selectElement.selectByIndex(index);
verify(select).selectByIndex(index);
assertThat(result).isSameAs(selectElement);
}
use of org.definitylabs.flue2ent.element.WebElementWrapper in project flue2ent by DefinityLabs.
the class SelectElementTest method selectByValue_callsSelectByValue.
@Test
public void selectByValue_callsSelectByValue() {
String value = "value";
SelectElement selectElement = new SelectElement(new WebElementWrapper(webElement));
SelectElement result = selectElement.selectByValue(value);
verify(select).selectByValue(value);
assertThat(result).isSameAs(selectElement);
}
use of org.definitylabs.flue2ent.element.WebElementWrapper in project flue2ent by DefinityLabs.
the class SimpleWebElementDecoratorProxyTest method findElement_headerRow_returnsNestedElement.
@Test
public void findElement_headerRow_returnsNestedElement() {
WebElement rowElement = mock(WebElement.class);
when(webElement.findElement(By.cssSelector(".header .row:nth-child(0)"))).thenReturn(rowElement);
WebElementWrapper webElementWrapper = new WebElementWrapper(webElement);
FakeTableElement fakeTableElement = SimpleWebElementDecoratorProxy.newInstance(FakeTableElement.class, webElementWrapper);
WebElementWrapper rowElementWrapper = fakeTableElement.headerRow(0);
assertThat(rowElementWrapper.webElement()).isSameAs(rowElement);
}
use of org.definitylabs.flue2ent.element.WebElementWrapper in project flue2ent by DefinityLabs.
the class SimpleWebElementDecoratorProxyTest method findElement_webElement_returnsNestedElement.
@Test
public void findElement_webElement_returnsNestedElement() {
WebElementWrapper webElementWrapper = new WebElementWrapper(webElement);
FakeTableElement fakeTableElement = SimpleWebElementDecoratorProxy.newInstance(FakeTableElement.class, webElementWrapper);
expectedException.expect(RuntimeException.class);
expectedException.expectMessage("Method not implemented");
fakeTableElement.webElement(0);
}
use of org.definitylabs.flue2ent.element.WebElementWrapper in project flue2ent by DefinityLabs.
the class SimpleWebElementDecoratorProxyTest method findElement_undefined_returnsNestedElement.
@Test
public void findElement_undefined_returnsNestedElement() {
WebElementWrapper webElementWrapper = new WebElementWrapper(webElement);
FakeTableElement fakeTableElement = SimpleWebElementDecoratorProxy.newInstance(FakeTableElement.class, webElementWrapper);
expectedException.expect(RuntimeException.class);
expectedException.expectMessage("Method not implemented");
fakeTableElement.undefined();
}
Aggregations