Forum Discussion

AmihaiAlfon's avatar
AmihaiAlfon
New Contributor
6 years ago

wait for string

hello,

i has desktop app.

when i click start i get strings about action that happend. and the same string replace to succeed or fail

for example:

start copy files >> copy files succeed \ copy files fail

i want to wait for string to appear, than i want to ask if it succeed or fail.

 

when i use waitProperty it fall if string dosen't appear.

 

someone?

thanks.

amihai

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi Amihai,

     

    As a possible option, you may try to use .WaitProperty() method and provide a regular expression so the method will wait until either successful or failure message appears.

     

    • AmihaiAlfon's avatar
      AmihaiAlfon
      New Contributor

      hey alex,

      thanks for replay.

       

      but if i use waitProperty if it not show i get error and the runs stop.

      can i use contain inside findChild? and on it i will do wait.

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Would it be possible to see the code you are executing?  WaitProperty should not "fail" necessarily...  If you're getting an error, it would be good to know what the error is, what code was executing it, etc.