For this you can use the OCR (optical character recognition) functionality. You can specify a search rectangle around the area where the name will be located, and then have the OCR read the text in that area. Then after you confirm the deletion of the contact, you can search your contact list for the text that it originally extracted from the panel (the person’s name) and see if it is there. The basic search with OCR will look something like this:
--use images to set the search rectangle, as in the line of code below:
put readtext(searchRectangle:("TLCorner1","BRCorner1")) into CustomerNameVar
click "DeleteButtonImage" //delete the contact
if not imagefound (text:CustomerNameVar, searchRectangle:("TLCorner2","BRCorner2"))
then
log CustomerNameVar & " was properly deleted from the list!"
else
log CustomerNameVar & " was not deleted from the list."
end if
You can read about best practices with OCR here, including setting the searchRectangle using images, and how to set the contrast and validCharacters: http://www.testplant.com/support/2012/02/working-with-ocr/