Checking for existence of toolbar element first by counting elements in class-based search array