waitForTitle, waitForLabel, waitForLabelContains functions & tests

Replacement for #663.