Class OccurrenceMatchingOptions

java.lang.Object
io.appium.java_client.imagecomparison.BaseComparisonOptions<OccurrenceMatchingOptions>
io.appium.java_client.imagecomparison.OccurrenceMatchingOptions

public class OccurrenceMatchingOptions extends BaseComparisonOptions<OccurrenceMatchingOptions>
  • Constructor Details

    • OccurrenceMatchingOptions

      public OccurrenceMatchingOptions()
  • Method Details

    • withThreshold

      public OccurrenceMatchingOptions withThreshold(double threshold)
      At what normalized threshold to reject an occurrence.
      Parameters:
      threshold - value in range 0..1. 0.5 is the default value.
      Returns:
      self instance for chaining.
    • enableMultiple

      public OccurrenceMatchingOptions enableMultiple()
      Whether to enable the support of multiple image occurrences.
      Returns:
      self instance for chaining.
      Since:
      Appium 1.21.0
    • withMatchNeighbourThreshold

      public OccurrenceMatchingOptions withMatchNeighbourThreshold(int threshold)
      The pixel distance between matches we consider to be part of the same template match. This option is only considered if multiple matches mode is enabled. 10 pixels by default.
      Parameters:
      threshold - The threshold value in pixels.
      Returns:
      self instance for chaining.
      Since:
      Appium 1.21.0
    • build

      public Map<String,Object> build()
      Description copied from class: BaseComparisonOptions
      Builds a map, which is ready to be passed to the subordinated Appium API.
      Overrides:
      build in class BaseComparisonOptions<OccurrenceMatchingOptions>
      Returns:
      comparison options mapping.