- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 Puppeteer 中,您可以评估异步函数:
await page.evaluate(async () => {
// await some promise
});
PuppeteerSharp 中是否有等效项?使用 EvaluateFunctionAsync
,任务在 promise 解决之前完成:
await page.EvaluateFunctionAsync(@"async () => {
// await some promise
}");
最佳答案
这是正确的方法,例如:
var six = await page.EvaluateFunctionAsync<int>("async () => await Promise.resolve(6)");
关于c# - 如何等待 PuppeteerSharp 中的异步函数评估,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51093017/
我知道在 js 中使用 Puppeteer 是可能的, 但我想知道是否有人想出如何在 PuppeteerSharp 中的页面级别进行代理(不同选项卡的不同代理)? 看来我可以捕捉到请求,但我不确定如何
我想根据测试需要设置浏览器的下载行为 我试过这个主题的解决方案:puppeteer - how to set download location var browser = await StartNe
将 google chrome 更新到最新版本 89.0.4389.82 (Official Build) (64-bit) 后开始出现错误。操作系统:Windows 10 错误: Puppeteer
我需要检查文件大小是否超过给定大小,取消下载。 这是我的 LaunchOptions : var browser = await Puppeteer.LaunchAsync(new LaunchOpt
在 Puppeteer 中,您可以评估异步函数: await page.evaluate(async () => { // await some promise }); PuppeteerSh
我正面临着一些恼人的情况。我们尝试在我们的应用程序中使用 PuppeteerSharp 来生成背景 PDF,虽然它在开发模式下运行良好,但在生产中却无法运行。 该应用程序是一个 WebAPI 2.0
以下 PuppeteerSharp 的要求;我不知道如何在 Windows 7 上使用 PuppeteerSharp,有人可以告诉我代码吗? 支持 WebSocket 库的最低 Windows 版本是
如何将 chrome 扩展加载到 PuppeteerSharp 驱动程序,类似于 Selenium 选项: ChromeOptions options = new ChromeOptions(); o
我是一名优秀的程序员,十分优秀!