add ability to check whether an element has focus
wrap all UiState actions in a WaitUntil call