Forum Discussion
Colin_McCrae
12 years agoCommunity Hero
Also, have you checked what type of object (if any) that FindChild is returning?
Ideally, I would use more than just the content text as the search criteria. ClassName or something so it actually returns the correct object. If you just search for "11", it'll find anything that matches so you may be getting labels back or who knows what.
I would be wrapping all this stuff in error checks and recovery handling. Automated tests need to be robust. They're no use if the slightest problem causes the whole thing to crash ...
Ideally, I would use more than just the content text as the search criteria. ClassName or something so it actually returns the correct object. If you just search for "11", it'll find anything that matches so you may be getting labels back or who knows what.
I would be wrapping all this stuff in error checks and recovery handling. Automated tests need to be robust. They're no use if the slightest problem causes the whole thing to crash ...