use waitUntil to let UI finish its change before querying using API