mcp icon indicating copy to clipboard operation
mcp copied to clipboard

browser_click not clicking

Open blex2011 opened this issue 1 year ago • 13 comments

I see the arrow appear in the correct place on the page but it never clicks. I have tried on many pages. I'm using latest version and chrome extension on Mac...

Here is an example

Image

Here is the results in cursor:

  • Page URL: https://github.com/BrowserMCP/mcp/issues/new
  • Page Title: New Issue
  • Page Snapshot
- document [ref=s2e2]:
  - link "Skip to content" [ref=s2e6]:
    - /url: "#start-of-content"
  - banner [ref=s2e11]:
    - heading "Navigation Menu" [level=2] [ref=s2e12]
    - button "Open global navigation menu" [ref=s2e19]
    - link "Homepage" [ref=s2e21]:
      - /url: https://github.com/
    - navigation "GitHub Breadcrumb" [ref=s2e24]:
      - list [ref=s2e25]:
        - listitem [ref=s2e26]:
          - link "BrowserMCP" [ref=s2e27]:
            - /url: /BrowserMCP
          - text: /
        - listitem [ref=s2e32]:
          - link "mcp" [ref=s2e33]:
            - /url: /BrowserMCP/mcp
    - button "Type / to search" [ref=s2e43]
    - link "Chat with Copilot" [ref=s2e53]:
      - /url: /copilot
    - button "Open Copilot…" [ref=s2e59]
    - button "Create something new" [ref=s2e64]
    - link "Your issues" [ref=s2e70]:
      - /url: /issues
    - link "Your pull requests" [ref=s2e71]:
      - /url: /pulls
    - link "You have no unread notifications" [ref=s2e73]:
      - /url: /notifications
    - button "Open user navigation menu" [ref=s2e79]
    - navigation "Repository" [ref=s2e88]:
      - list [ref=s2e89]:
        - listitem [ref=s2e90]:
          - link "Code" [ref=s2e91]:
            - /url: /BrowserMCP/mcp
        - listitem [ref=s2e93]:
          - link "Issues 42" [ref=s2e94]:
            - /url: /BrowserMCP/mcp/issues
        - listitem [ref=s2e97]:
          - link "Pull requests 2" [ref=s2e98]:
            - /url: /BrowserMCP/mcp/pulls
        - listitem [ref=s2e101]:
          - link "Actions" [ref=s2e102]:
            - /url: /BrowserMCP/mcp/actions
        - listitem [ref=s2e104]:
          - link "Projects" [ref=s2e105]:
            - /url: /BrowserMCP/mcp/projects
        - listitem [ref=s2e107]:
          - link "Security" [ref=s2e108]:
            - /url: /BrowserMCP/mcp/security
        - listitem [ref=s2e110]:
          - link "Insights" [ref=s2e111]:
            - /url: /BrowserMCP/mcp/pulse
  - main [ref=s2e117]:
    - region [ref=s2e120]
    - link "View blex2011's profile" [ref=s2e126]:
      - /url: /blex2011
      - text: View blex2011's profile
      - img [ref=s2e128]
    - heading "Create new issue" [level=2] [ref=s2e131]
    - text: Add a title *
    - textbox "Add a title" [ref=s2e145]: browser_click not clicking
    - group "Add a description" [ref=s2e150]:
      - text: "Add a description Markdown input: edit mode selected."
      - navigation "View mode" [ref=s2e159]:
        - tablist [ref=s2e160]:
          - tab "Write" [selected] [ref=s2e161]
          - tab "Preview" [ref=s2e162]
      - toolbar "Formatting tools" [ref=s2e164]:
        - button "Heading" [ref=s2e166]
        - button "Bold" [ref=s2e167]
        - button "Italic" [ref=s2e168]
        - button "Quote" [ref=s2e171]
        - button "Code" [ref=s2e172]
        - button "Link" [ref=s2e173]
        - button "Unordered list" [ref=s2e176]
        - button "Numbered list" [ref=s2e177]
        - button "Task list" [ref=s2e178]
        - button "Mention" [ref=s2e181]
        - button "Reference" [ref=s2e182]
        - button "Saved replies" [ref=s2e183]
        - button "Slash commands" [ref=s2e184]
      - textbox "Markdown value" [ref=s2e187]: I see the arrow appear in the correct place on the page but it never clicks. Here is an example
      - alert [ref=s2e188]
      - button "Paste, drop, or click to add files" [ref=s2e192]
    - heading "Metadata" [level=2] [ref=s2e200]
    - heading "Assignees" [level=3] [ref=s2e204]
    - text: No one assigned
    - heading "Labels" [level=3] [ref=s2e209]
    - text: No labels
    - heading "Type" [level=3] [ref=s2e214]
    - text: No type
    - heading "Projects" [level=3] [ref=s2e219]
    - text: No projects
    - heading "Milestone" [level=3] [ref=s2e224]
    - text: No milestone
    - checkbox "Create more" [ref=s2e232]
    - text: Create more
    - status [ref=s2e235]
    - button "Cancel" [ref=s2e237]
    - button "Create ( command enter )" [ref=s2e240]
  - contentinfo [ref=s2e250]:
    - heading "Footer" [level=2] [ref=s2e251]
    - link "GitHub Homepage" [ref=s2e254]:
      - /url: https://github.com
    - text: © 2025 GitHub, Inc.
    - navigation "Footer" [ref=s2e256]:
      - heading "Footer navigation" [level=3] [ref=s2e257]
      - list "Footer navigation" [ref=s2e258]:
        - listitem [ref=s2e259]:
          - link "Terms" [ref=s2e260]:
            - /url: https://docs.github.com/site-policy/github-terms/github-terms-of-service
        - listitem [ref=s2e261]:
          - link "Privacy" [ref=s2e262]:
            - /url: https://docs.github.com/site-policy/privacy-policies/github-privacy-statement
        - listitem [ref=s2e263]:
          - link "Security" [ref=s2e264]:
            - /url: https://github.com/security
        - listitem [ref=s2e265]:
          - link "Status" [ref=s2e266]:
            - /url: https://www.githubstatus.com/
        - listitem [ref=s2e267]:
          - link "Docs" [ref=s2e268]:
            - /url: https://docs.github.com/
        - listitem [ref=s2e269]:
          - link "Contact" [ref=s2e270]:
            - /url: https://support.github.com?tags=dotcom-footer
        - listitem [ref=s2e271]:
          - button "Manage cookies" [ref=s2e273]
        - listitem [ref=s2e274]:
          - button "Do not share my personal information" [ref=s2e276]
  - text: New Issue 3 results
  - document [ref=s2e281]:
    - img [ref=s2e286]

Image

blex2011 avatar Jun 22 '25 02:06 blex2011

me too. cursor point has pop-up and moves to button, but nothing happens

sakada3 avatar Jun 23 '25 12:06 sakada3

Samehere... other actions do work but the clicking does not

sinscrit avatar Jul 01 '25 19:07 sinscrit

+1

mzopedia avatar Jul 09 '25 07:07 mzopedia

+1

tocer avatar Jul 12 '25 12:07 tocer

I just used another browser and it works, I was using Chromium and switched to Brave

ludwigvonmises3 avatar Jul 15 '25 19:07 ludwigvonmises3

+1

Metroxe avatar Jul 16 '25 20:07 Metroxe

Same issue in Edge

hades200082 avatar Jul 18 '25 11:07 hades200082

UPDATE: Switching to Brave browser resolved the issue. Systematic testing revealed a consistent ~90px upward offset between the intended target and the received click event in Chrome. No such offset was observed when using Brave.

I am having a similar issue with Chrome and was able to determine that the clicks are happening but are mistargeted. The virtual cursor moves to the right location but the click event is seemingly triggered on the element under the bottom left corner of the cursor image rather than the top left.

  • BrowserMCP Version: 0.1.3
  • Chrome Version: 138.0.7204.158 (Official Build) (64-bit)
  • Agent: Cursor v1.2.4
  • Operating System: Linux 6.6.87.2-microsoft-standard-WSL2 (Windows 10)

I made screen recordings from a test page:

Me clicking manually:

Image

BrowserMCP Clicking:

Image

You can see that when I click the Last Click Event Info section gets populated, while when BrowserMCP does it we register a global click event, but its on the wrong element so the interaction is not triggered.

Console logs showing the difference between my click and the MCP click:

test-click-events.html:268 [CLICK-TEST] Click #1: {
    "clickNumber": 1,
    "timestamp": "2025-07-22T00:30:37.239Z",
    "elementType": "HTML Checkbox",
    "elementId": "testCheckbox",
    "mouseCoordinates": {},
    "elementCoordinates": {
        "left": 42.6598014831543,
        "top": 646.3955688476562,
        "width": 19.495737075805664,
        "height": 19.495737075805664
    },
    "relativeCoordinates": {
        "x": null,
        "y": null
    },
    "target": {
        "tagName": "INPUT",
        "className": "",
        "id": "testCheckbox",
        "dataset": {
            "testId": "html-checkbox"
        }
    },
    "additionalInfo": {
        "checked": true
    }
}
test-click-events.html:425 [CLICK-TEST] Global click detected on: {
    "tagName": "DIV",
    "className": "target-info",
    "id": "",
    "coordinates": {
        "x": 57,
        "y": 891
    }
}

Here is the HTML for the checkbox test section:

<div class="test-section">
    <h3>2. Checkbox Test</h3>
    <p>Test clicking on a checkbox input element.</p>
    <input type="checkbox" id="testCheckbox" data-test-id="html-checkbox">
    <label for="testCheckbox">Test Checkbox</label>
    <div class="target-info">
        <strong>Target:</strong> <span class="element-type">HTML Checkbox</span><br>
        <strong>ID:</strong> testCheckbox<br>
        <strong>Expected Behavior:</strong> Should toggle checkbox state and trigger change event
     </div>
</div>

And the relevant JS:

        // Global click handler to catch any missed clicks
        document.addEventListener('click', function(event) {
            // Only log if it's not one of our test elements
            const testElements = document.querySelectorAll('[data-test-id]');
            let isTestElement = false;
            testElements.forEach(el => {
                if (el.contains(event.target) || el === event.target) {
                    isTestElement = true;
                }
            });

            if (!isTestElement) {
                console.log(`[CLICK-TEST] Global click detected on:`, {
                    tagName: event.target.tagName,
                    className: event.target.className,
                    id: event.target.id,
                    coordinates: { x: event.clientX, y: event.clientY }
                });
            }
        });

        // 2. Checkbox Test
        document.getElementById('testCheckbox').addEventListener('change', function(event) {
            const info = logClickEvent(event, 'HTML Checkbox', 'testCheckbox', {
                checked: this.checked
            });
        });
        function logClickEvent(event, elementType, elementId, additionalInfo = {}) {
            clickCount++;

            const rect = event.target.getBoundingClientRect();
            const clickInfo = {
                clickNumber: clickCount,
                timestamp: new Date().toISOString(),
                elementType: elementType,
                elementId: elementId,
                mouseCoordinates: {
                    clientX: event.clientX,
                    clientY: event.clientY,
                    pageX: event.pageX,
                    pageY: event.pageY
                },
                elementCoordinates: {
                    left: rect.left,
                    top: rect.top,
                    width: rect.width,
                    height: rect.height
                },
                relativeCoordinates: {
                    x: event.clientX - rect.left,
                    y: event.clientY - rect.top
                },
                target: {
                    tagName: event.target.tagName,
                    className: event.target.className,
                    id: event.target.id,
                    dataset: event.target.dataset
                },
                additionalInfo: additionalInfo
            };

            lastClickInfo = clickInfo;

            // Update the display
            updateClickInfoDisplay(clickInfo);

            // Log to console
            console.log(`[CLICK-TEST] Click #${clickCount}:`, clickInfo);

            return clickInfo;
        }

hdotson1 avatar Jul 22 '25 00:07 hdotson1

This issue is preventing me from using this tool entirely at present. Without the ability to click, it's useless.

hades200082 avatar Jul 30 '25 12:07 hades200082

same here!

danielsinewe avatar Aug 13 '25 12:08 danielsinewe

+1 wont work on brave browser either

heapframe avatar Oct 31 '25 16:10 heapframe

Same here

KalharPandya avatar Nov 10 '25 03:11 KalharPandya

Browser MCP has been completely rewritten, so most open issues should now be resolved. I'm closing this issue as part of a cleanup. If the problem persists on the latest version, you're welcome to file a new issue.

namuorg avatar Oct 27 '26 09:10 namuorg