【发布时间】:2020-05-28 13:00:48
【问题描述】:
我最近将我的 puppeteer 版本从 2.1 更新到了 3.1。我在以前的版本上使用了 pupeteer-firefox。现在由于 pupeteer 3.1 内置了 firefox,我正在使用它。但这只是 pupeteer 的一个实验性功能。
此代码在以前的版本中正常工作。
const elementHandle = await page.$("iframe[src^=\"https://docs.google.com/picker\"] [id=\":7\"]")
await elementHandle.click()
复制步骤
- 登录谷歌:https://accounts.google.com/ServiceLogin?hl=en&gl=en
- 转至:https://www.google.com/maps/d/?hl=en&gl=en
- 创建新地图
- 搜索位置并将其添加到地图中
- 点击添加图片图标image icon
现在将打开一个 iframe。我需要在 iframe 中单击带有 id=":7" 的元素并输入图像 url。有人能帮帮我吗?
【问题讨论】:
标签: google-maps firefox iframe puppeteer