Resolved an issue where test cases would fail and create exceptions.

This was due to the case of no button titles not being handled.