Forum Discussion

earriaga's avatar
earriaga
Occasional Contributor
13 years ago

Look for Text inside a window

I am writting a scrip that pings an address until the command window reads "Request timed out." I am using Test Complete 7.52 Standard version. How do I tell me script to look for "Request timed out." inside the command window? This would help me so much!

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    What are you testing by doing this?  There may be a better way.  It's not easy to actually parse out the text from inside a console window.  If there is another purpose to you pinging the address, it's possible you can find ways of doing so that don't involve the actual "ping" command.
  • earriaga's avatar
    earriaga
    Occasional Contributor
    Well I am actually hard rebooting a device and then pinging it to assure that it is back online. I just want to catch it when it becomes offline. Pinging sounded like a great idea to see if it is offline. I want to see what pockets are being dropped, but I am using wireshark for that. I just want to know when it is offline after it has been power cycled. So I can stop my wireshark from running so I can tell which pockets have been dropped. In general, I just want to know how to or if possible to read text from windows. Thanks for the reply!