wait for DOM to remove attribute

Wait for a DOM ready to remove attribute, else got error:
unknown error: Cannot read property 'removeAttribute' of undefined  
http://teamcity.wgtn.silverstripe.com/viewLog.html?buildId=76210&buildTypeId=meridian_MeridianTeslaBehat&tab=buildLog