Forum Discussion

Ravik's avatar
Ravik
Super Contributor
13 years ago

How to bypass if Object not found

Hi Guy's



I am using TestComplete 8.6 for Web application testing. My problem is that, in my application one object change randamly (I am not sure when it's change) I use .Exist method like



If (Sys.Process("internetExplorer").Object ).Exist Then

log.message (Sys.Process("internetExplorer").Object, "innertext")



Else

log.message(Object Not Found)



End If




this method nor work for me. what I can do??

Please help me.



Thanks

Ravik

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Community Hero
    Hi Ravik,



    Instead of .Process, .Object, etc. try their Waitxxx complementaries (e.g. WaitProcess, WaitPanel, WaitWindow, etc.).

    See relevant TestComplete help topics for more details.
  • Ravik's avatar
    Ravik
    Super Contributor








     

    alk



    In my Application same object is change randamly. I am not sure when random object is came.

    What I want to do,



    I want to check - If Random object is appear Then Do Task 1 else Random Object not appear Then DO Task 2.



    So I check If Random object is Exist.



    How we can do like this thing in VBScript.



    Thanks

    Ravik