Activity log for bug #1381945

Date Who What changed Old value New value Message
2014-10-16 08:50:55 Ned bug added bug
2014-10-16 08:51:46 Ned description I have found that when using the with keyword with a region, it does not always apply to the statements beneath. For example, in the following code def dispSchemeListRegion(sTestId,iDelay): match = findLog(sTestId,pDispScreenTitleBar) if(match): x = match.getX() y = match.getY() else: exit(0) reg = Region(x,y,483,217) rDispSchemeList = Region(reg.offset(463,429)) rDispSchemeList.setAutoWaitTimeout(iDelay) return rDispSchemeList ----------------------------------------------------------------------------- rDispSchemeList = dispSchemeListRegion(sTestId,0.5) #the wait delay of .5 seconds is not applied to the the while loop with rDispSchemeList: while not exists(pDispSchemeScrollBarBottom): try: rDispSchemeList.click(pImage) type(Key.ENTER) break except FindFailed: type(Key.DOWN) #however, in the following example, it is and the whole block runs much faster while not rDispSchemeList.exists(pDispSchemeScrollBarBottom): try: rDispSchemeList.click(pImage) type(Key.ENTER) break except FindFailed: type(Key.DOWN) Version 1.0.1 I have found that when using the with keyword with a region, it does not always apply to the statements beneath. For example, in the following code def dispSchemeListRegion(sTestId,iDelay):     match = findLog(sTestId,pDispScreenTitleBar)     if(match):         x = match.getX()         y = match.getY()     else:         exit(0)     reg = Region(x,y,483,217)     rDispSchemeList = Region(reg.offset(463,429))     rDispSchemeList.setAutoWaitTimeout(iDelay)     return rDispSchemeList ----------------------------------------------------------------------------- rDispSchemeList = dispSchemeListRegion(sTestId,0.5) #the wait delay of .5 seconds is not applied to the the while loop with rDispSchemeList:     while not exists(pDispSchemeScrollBarBottom):          try:              rDispSchemeList.click(pImage)              type(Key.ENTER)              break          except FindFailed:                 type(Key.DOWN) #however, in the following example, it is and the whole block runs much faster while not rDispSchemeList.exists(pDispSchemeScrollBarBottom):     try:         rDispSchemeList.click(pImage)         type(Key.ENTER)         break     except FindFailed:         type(Key.DOWN)
2014-10-16 10:24:44 RaiMan sikuli: status New In Progress
2014-10-16 10:24:51 RaiMan sikuli: importance Undecided Medium
2014-10-16 10:24:54 RaiMan sikuli: assignee RaiMan (raimund-hocke)
2014-10-16 10:24:57 RaiMan sikuli: milestone 1.2.0
2014-10-16 10:34:49 RaiMan summary The With keyword is not reliable [1.0.1] Jython With: setAutoWaitTimeout ignored - fixed in 1.1.0
2014-10-16 10:34:54 RaiMan sikuli: status In Progress Fix Committed
2014-10-16 10:34:58 RaiMan sikuli: importance Medium Critical
2014-10-16 10:35:12 RaiMan sikuli: milestone 1.2.0 1.1.0