use of org.testfx.service.query.NodeQuery in project TestFX by TestFX.
the class ListViewMatchers method hasListCell.
private static boolean hasListCell(ListView listView, Object value) {
NodeFinder nodeFinder = FxAssert.assertContext().getNodeFinder();
NodeQuery nodeQuery = nodeFinder.from(listView);
return nodeQuery.lookup(SELECTOR_LIST_CELL).<Cell>match(cell -> hasCellValue(cell, value)).tryQuery().isPresent();
}
use of org.testfx.service.query.NodeQuery in project TestFX by TestFX.
the class TableViewMatchers method hasTableCell.
private static boolean hasTableCell(TableView tableView, Object value) {
NodeFinder nodeFinder = FxAssert.assertContext().getNodeFinder();
NodeQuery nodeQuery = nodeFinder.from(tableView);
return nodeQuery.lookup(SELECTOR_TABLE_CELL).<Cell>match(cell -> hasCellValue(cell, value)).tryQuery().isPresent();
}
use of org.testfx.service.query.NodeQuery in project TestFX by TestFX.
the class FxRobot method pointOfVisibleNode.
private <T extends Node> PointQuery pointOfVisibleNode(Matcher<T> matcher) {
NodeQuery nodeQuery = lookup(matcher);
Node node = queryVisibleNode(nodeQuery, "the matcher \"" + matcher.toString() + "\"");
return point(node);
}
use of org.testfx.service.query.NodeQuery in project TestFX by TestFX.
the class FxRobot method point.
@Override
public PointQuery point(String query) {
NodeQuery nodeQuery = lookup(query);
Node node = queryNode(nodeQuery, "the query \"" + query + "\"");
return point(node).atPosition(context.getPointPosition());
}
use of org.testfx.service.query.NodeQuery in project TestFX by TestFX.
the class FxRobot method pointOfVisibleNode.
private <T extends Node> PointQuery pointOfVisibleNode(Predicate<T> predicate) {
NodeQuery nodeQuery = lookup(predicate);
Node node = queryVisibleNode(nodeQuery, "the predicate");
return point(node);
}
Aggregations