passing the right context to waitForElement callbacks