Forum Discussion

salley's avatar
salley
Frequent Contributor
5 years ago

How to reset the Object default auto time-out

Hi,

i've a situation where object exists but not VisibleOnScreen , which is expected. i'm trying to perfom some action only if it's visibleonscreen. The default time out is set to 5000 but the script waits for 10 secs, below is an example of my code:

ClickOKDateUpdatePopUpWindow()
   log.message "starting"
        Set oBtn=oMainPage.PanelHardEditDiv.WaitAliasChild("btnOK",5000)
          If oBtn.Exists Then
               log.Message "exists"
                   If oBtn.VisibleOnscreen Then
                      oBtn.CLick
                Else
                     Log.Message "Object is not VisibleOnScreen"
              End If
     Else
           Log.Error "Object Not Found"
   End If
End Sub

I'm expecting object not to be visible on screen, and testcomplete to wait 5 secs,,, Instead it's taking 30 secs,, Not sure where i'm doing wrong

Log is attached

 

 

 

 

  • Try to disable option Tools|Options| Engines|NameMapping|Search for visible objects first.

    I think it could help.

  • Bobik's avatar
    Bobik
    Frequent Contributor

    Try to disable option Tools|Options| Engines|NameMapping|Search for visible objects first.

    I think it could help.

    • salley's avatar
      salley
      Frequent Contributor

      Thanks, recommendation seems to be working just fine. My question would be in what situation we should have that option checked, will there be any impact on existing test cases. Thanks again for your help