获取隐藏按钮元素的选择器
Get the selector of a hidden button element
我正在尝试为以下按钮找到一个选择器:
Inspecting Button
我需要这个来执行 Puppeteer 无头 chrome 任务。
例如:await page.waitForSelector(The selecor comes here);
站点:https://www.notebooksbilliger.de/
该按钮在将随机产品添加到购物车后出现,然后重定向到:https://www.notebooksbilliger.de/kasse/anmelden
希望得到一些帮助,浪费了很多时间来解决这个问题:)
因为 select 没有特定的 ID。我在这里尝试使用 href 属性。
buttons = document.querySelectorAll("a[href='https://www.notebooksbilliger.de/kasse/unregistriert']");
现在,您可以使用
执行任何脚本
buttons[0]
我正在尝试为以下按钮找到一个选择器: Inspecting Button
我需要这个来执行 Puppeteer 无头 chrome 任务。
例如:await page.waitForSelector(The selecor comes here);
站点:https://www.notebooksbilliger.de/ 该按钮在将随机产品添加到购物车后出现,然后重定向到:https://www.notebooksbilliger.de/kasse/anmelden
希望得到一些帮助,浪费了很多时间来解决这个问题:)
因为 select 没有特定的 ID。我在这里尝试使用 href 属性。
buttons = document.querySelectorAll("a[href='https://www.notebooksbilliger.de/kasse/unregistriert']");
现在,您可以使用
执行任何脚本buttons[0]