deserializeFinder method

SerializableFinder deserializeFinder(
  1. Map<String, String> json
)

Deserializes the finder from JSON generated by SerializableFinder.serialize.

Implementation

SerializableFinder deserializeFinder(Map<String, String> json) {
  return switch (json['finderType']) {
    'ByType'           => ByType.deserialize(json),
    'ByValueKey'       => ByValueKey.deserialize(json),
    'ByTooltipMessage' => ByTooltipMessage.deserialize(json),
    'BySemanticsLabel' => BySemanticsLabel.deserialize(json),
    'ByText'           => ByText.deserialize(json),
    'PageBack'         => const PageBack(),
    'Descendant'       => Descendant.deserialize(json, this),
    'Ancestor'         => Ancestor.deserialize(json, this),
    _ => throw DriverError('Unsupported search specification type ${json['finderType']}'),
  };
}