I have been trying to resolve this issue for a while - I thought I had it (Some times the script runs through successfully) but apparently I don't.
I believe the issue is because I am trying to use a contains method with a string value which may at some point be null.
I found an old post about this and have followed the advice but still sometimes get an error.
http://www.ranorex.com/forum/object-ref ... t4384.html
The Item in question is a SMSStatus.TagValue
I have implemented a series of wait loops to try and ensure things can be processed.
1 - wait for item to exist
while (repo.GroupcallMessengerRoot.MessageDetails.Summary.SMSStatusInfo.Exists() == false) { Thread.Sleep(500); if (LoopLimiter <=0) break; //Report.Info("Status",LoopLimiter.ToString()); LoopLimiter--;2 - wait for item to be visible (not strictly necessary but helps me with debugging)
while (!repo.GroupcallMessengerRoot.MessageDetails.Summary.SMSStatus.Visible) { Thread.Sleep(500); if (LoopLimiter <=0) break; LoopLimiter--;3 - wait for tagValue to not be null
while (repo.GroupcallMessengerRoot.MessageDetails.Summary.SMSStatus.TagValue.Equals(null)) { Thread.Sleep(500); if (LoopLimiter <=0) break; //Report.Info("TagValue",LoopLimiter.ToString()); LoopLimiter--;There are also reports along the way so I know it is getting as far as the check for null value before it falls over.
Looking at the screenshot that is taken when it fails I do not see any text displayed in the area where the text form this item should be - That could be an indication that it is indeed null. if so why isn't my 3rd wait loop catching it?
As always any help is greatly appreciated
Thanks
Ben