MDL-43951 behat: Fixing random failure

NodeElement->hasAttribute() (JS enabled) queries selenium
about whether it has any attribute or not, if due to an
AJAX request the field node changed selenium can not access
that node and throws an exception.