Navigate to URLs Find elements using various locator strategies Click, type, and interact with elements Perform mouse actions (hover, drag and drop) Handle keyboard input Take screenshots Upload files
暂无评论. 成为第一个评论的人!
登录以参与讨论
Launches a browser session. Parameters: browser (string, required), options (object, optional) - Options include headless mode and additional browser arguments.
Navigates to a URL. Parameters: url (string, required) - The URL to navigate to.
Performs a mouse action on an element. Parameters: action (string, required), by (string, required), value (string, required), timeout (number, optional) - Maximum wait time in milliseconds.
Types text into an element, clearing the field first. Parameters: by (string, required), value (string, required), text (string, required), timeout (number, optional) - Maximum wait time in milliseconds.
Gets the text content of an element. Parameters: by (string, required), value (string, required), timeout (number, optional) - Maximum wait time in milliseconds.
Gets an attribute value from an element. Parameters: by (string, required), value (string, required), attribute (string, required), timeout (number, optional) - Maximum wait time in milliseconds.
Presses a keyboard key. Parameters: key (string, required) - The key to press (e.g., Enter, Tab).
Uploads a file via a file input element. Parameters: by (string, required), value (string, required), filePath (string, required) - Absolute path to the file, timeout (number, optional) - Maximum wait time in milliseconds.
Captures a screenshot of the current page. Parameters: outputPath (string, optional) - Save path; if omitted, returns base64 image data.
Closes the current browser session. No parameters required.
Executes JavaScript in the browser for advanced interactions. Parameters: script (string, required) - JavaScript code to execute, args (array, optional) - Arguments accessible within the script.
Manages browser windows and tabs. Parameters: action (string, required) - Action to perform: list, switch, switch_latest, or close, handle (string, optional) - Window handle (required for switch).
Switches focus to a frame or back to the main page. Parameters: action (string, required) - switch or default, by (string, optional), value (string, optional), index (number, optional), timeout (number, optional) - Maximum wait time in milliseconds.
Handles browser alert, confirm, or prompt dialogs. Parameters: action (string, required) - accept, dismiss, get_text, or send_text, text (string, optional) - Text to send (required for send_text), timeout (number, optional) - Maximum wait time in milliseconds.
Adds a cookie. Parameters: name (string, required), value (string, required), domain (string, optional), path (string, optional), secure (boolean, optional), httpOnly (boolean, optional), expiry (number, optional) - Unix timestamp.
Gets cookies. Parameters: name (string, optional) - Cookie name; omit for all cookies.
Deletes cookies. Parameters: name (string, optional) - Cookie name; omit to delete all.
Gets browser diagnostics captured via WebDriver BiDi. Parameters: type (string, required) - console, errors, or network, clear (boolean, optional) - Clear buffer after returning (default: false).