browser-use 0.2.3

A lightweight Rust library for browser automation via Chrome DevTools Protocol (CDP), featuring a built-in Model Context Protocol (MCP) server for AI-driven browser automation
Documentation
JSON.stringify(
  (function () {
    const config = __SELECT_CONFIG__;
    const element = document.querySelector(config.selector);

    if (!element) {
      return { success: false, error: "Element not found" };
    }

    if (element.tagName !== "SELECT") {
      return { success: false, error: "Element is not a SELECT element" };
    }

    element.value = config.value;
    element.dispatchEvent(new Event("change", { bubbles: true }));

    return {
      success: true,
      selectedValue: element.value,
      selectedText: element.options[element.selectedIndex]?.text ?? null,
    };
  })()
);