selector - Puppeteer waitForSelector('selector') 是否仅适用于字符串而不适用于 page.$('selector')?
问题描述
我正在使用 Puppeteer 3.0.2
我像这样存储我的定位器-> const ele = await page.$('.asd')
这似乎不起作用-> waitForSelecttor(ele, { visible:true })
我不想使用这样的字符串->
常量 ele = '.asd'
waitForSelecttor(ele,{可见:真})
我想对所有内容都使用一个选择器,而不是字符串和 a-> const ele = await page.$('.asd')
即使我必须创建一个函数来做同样的事情。
我怎样才能做到这一点?
解决方案
推荐阅读
- xcode - 电子邮件的xcode testflight正文
- c++ - g++ 9.1 更新后 std::stable_sort 出现问题
- javascript - Angular 7 - 从数组中拼接和删除(下拉值)
- angular - 在ngFor Angular 8+中反转数组项而不更改数组索引的简单管道?
- ios - {"cod":401, "message": "Invalid API key on Open Weather API error using Moya
- github - GitHub 状态:失败状态,但仍然可以合并受保护的分支
- aws-api-gateway - 是否可以向 API 网关上的所有端点添加标头,而不是单独添加到每个请求?
- dax - 将 SELECTEDVALUE 与 PowerPivot 一起使用
- facebook - Facebook Insights API 分页
- python - 使用 Marshmallow SQLAlchemy 序列化 UUID