wait_for_element
Wait for specific elements to appear on web pages before interacting with them. Prevents errors when handling dynamic content, page transitions, or elements that load after user actions like clicking buttons.
Instructions
Wait for a specific element to appear on the page before continuing. Essential for handling dynamic content that loads asynchronously, page transitions, or elements that appear after clicking buttons. Prevents errors from trying to interact with elements that haven't loaded yet. Commonly used after login, navigation, or clicking buttons that trigger loading states.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
selector | Yes | CSS selector of the element to wait for (e.g., '.chat-container', '#message-input', '[data-loaded="true"]') | |
sessionId | Yes | Session ID obtained from initialize_session | |
timeout | No | Maximum time in milliseconds to wait before timing out. Increase for slow-loading pages (default: 30000) |