using find to wait for element to appear (js testing issue)