Comment 6 for bug 519916

Revision history for this message
TPasadena (chou-terrence) wrote :

I found this fix creates another problem.
Before, we call click(img) or wait(img), if the img not found, it will return None or []
After this fix, it will generate exception.

In order to avoid this exception, I call my own _click(img) and _wait(img) in stead of original ones.

Sample code:
def _wait(img, timeout=3000):
   try:
      s = wait(img, timeout)
   except:
      s = []
   return s