Writing expected wait statements into for loop

For REF-98
Fix for REF-107

Grabs entire bottom most valid line.
Latest Plugin Deployment Build: 0.0.511

REF-107,REF-98