waitForSelector() method. Wait for the selector to appear in page . If at the moment of calling the method the selector already exists, the method will return immediately. If the selector doesn’t appear after the timeout milliseconds of waiting, the function will throw.