stagehand icon indicating copy to clipboard operation
stagehand copied to clipboard

page.act on an ObserveResult with click method does not replicate page.click

Open ccpacillos opened this issue 8 months ago • 1 comments

From this:

const [action] = await page.observe(step);

I get an ObserveResult

{
  description: "A menuitem button labeled 'Rewards' in the menubar, which can be clicked to navigate to the Rewards section.",
  method: "click",
  selector: "xpath=/html/body[1]/div[1]/div[1]/div[1]/div[2]/button[6]"
}

Doing await page.act(action); does not click the button.

But it worked as expected when I tested using await page.click(action.selector). Is page.act() doing some conversion or processing on the selector?

ccpacillos avatar Jun 04 '25 01:06 ccpacillos

Hey @ccpacillos do you have a URL that I can try to reproduce on? trying to confirm if this will be fixed by #819

seanmcguire12 avatar Jun 24 '25 00:06 seanmcguire12

Hi @seanmcguire12 . I just got back on this. Thanks for checking on this issue. I'll try to replicate again and will just create another issue if needed. Thanks!

ccpacillos avatar Jul 10 '25 01:07 ccpacillos