use of org.definitylabs.flue2ent.element.table.TableElement in project flue2ent by DefinityLabs.
the class WebsiteTest method from_withClass_returnsFunction.
@Test
public void from_withClass_returnsFunction() {
TableElement tableElement = mock(TableElement.class);
Website website = mock(Website.class);
when(website.at(TableElement.class)).thenReturn(tableElement);
Function<Website, TableElement> from = Website.from(TableElement.class);
TableElement response = from.apply(website);
verify(website).at(TableElement.class);
assertThat(response).isSameAs(tableElement);
}
use of org.definitylabs.flue2ent.element.table.TableElement in project flue2ent by DefinityLabs.
the class AbstractWebElementProxyTest method findByTagName_results_returnsTableElement.
@Test
public void findByTagName_results_returnsTableElement() {
when(website.findElement(By.tagName("table"))).thenReturn(new WebElementWrapper(webElement));
MyPage myPage = newInstance(MyPage.class, website);
TableElement results = myPage.results();
assertThat(results.webElement().webElement()).isSameAs(webElement);
}
use of org.definitylabs.flue2ent.element.table.TableElement in project flue2ent by DefinityLabs.
the class FindRowByColumnTest method beforeEach.
@Before
public void beforeEach() {
tableWebElement = mock(WebElement.class);
columnWebElement = mock(WebElement.class);
rowWebElement = mock(WebElement.class);
when(rowWebElement.findElements(By.tagName("td"))).thenReturn(Collections.singletonList(columnWebElement));
when(tableWebElement.findElements(By.tagName("tr"))).thenReturn(Collections.singletonList(rowWebElement));
table = new TableElement(new WebElementWrapper(tableWebElement));
row = table.row(0);
}
Aggregations