Wait for an element

Wait until the state of an element changes.