Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Sep 13, 2017 11:24

You can accelerate your execution, and also make the OCR results more accurate and consistent, by using the caching ability of the validations mechanism.

 By Ido Meroz


You can accelerate your execution, and also make the results more accurate and consistent, by using the caching ability of the validations mechanism. Meaning, in case you are performing several text validations (checkpoint-text) on the same screen, the first validation will capture & analyze the screen (which will take several seconds), but the following validations won't analyze the screen, and will return the result almost immediately according to the cached analyzed screen.

Best practice:

  • Use the same OCR settings in all validations, including source & region. Using different OCR settings will require performing new analysis.
  • Don't perform any action that might change the screen of the device (touch, swipe, press-key, rotate, wait, etc…) between the validations. Any of these operations deletes the validations cache.
  • Don't use scrolling inside the validation. Scrolling clears the cache.
  • Don't use timeout in the validations - you can use positive timeout only in the first one. In the next validations, if you want to analyze the same device screen, you should use timeout=0. If you'll use timeout >0 , the cache will be deleted.
  • Don't use native objects. Currently only the OCR results are being cached.