getByTestId
TestNode
getByTestId(
Get a single node by testID
Implementation
TestNode getByTestId(String testId) {
final results = findByTestId(testId);
if (results.isEmpty) {
throw TestingException('No node found with testID: $testId');
}
if (results.length > 1) {
throw TestingException('Multiple nodes found with testID: $testId');
}
return results.first;
}