Replace waiting on button click in 'wait_for_alert_message' method

Change-Id: I5fafb0cac514699e23bc929a57177e01c2e90b65
Closes-bug: #1370010
Merge "Replace waiting on button click in 'wait_for_alert_message' method"