wait fo document before switch tabs