-
Notifications
You must be signed in to change notification settings - Fork 584
Unable to click checkbox #553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
const observations1 = await stagehand.page.observe({
instruction: `找到 '[class^="index_search_"] input'这个输入框,输入关键字 小米14`,
});
await stagehand.page.act(observations1[0]);
const observations2 = await stagehand.page.observe({
instruction: `找到 '[class^="index_search_"] button' 这个按钮,点击它`,
});
await stagehand.page.act(observations2[0]);
const headlines = await stagehand.page.extract({
instruction: "提取页面的前5条新闻",
schema: z.object({
news: z.array(
z.object({
title: z.string(),
url: z.string(),
points: z.number(),
})
),
}),
});
` |
A bit confused, is this a related issue or a different issue? |
I am also facing the same issue. Not sure what is wrong with this code. export async function clickOnWarningCheckButton(page: Page) {
const instruction =
"Click on the only checkbox present in the modal window";
const cachedAction = await readCache(instruction);
if (cachedAction) {
await page.act(cachedAction);
} else {
try {
const results = await page.observe({
instruction,
onlyVisible: true,
returnAction: true,
});
await simpleCache(instruction, results[0]);
await page.act(results[0]);
return true;
} catch (error) {
console.error("Error clicking on the checkbox:", error);
}
}
} |
To reproduce:
Unable to click the terms and conditions button, fails to do so after some retries with different models (sonnet 3.7, 4o, etc)
The text was updated successfully, but these errors were encountered: