木偶:等待事件时超出超时

时间:2020-10-10 13:53:40

标签: puppeteer

我有一个ng-click的锚点标签。

<a ng-if="!foo.isDisabled" ng-click="itemTapped($event,foo)" ng-class="getClass(foo)" class="test-class">Test Link</a>

我以itemTapped方法进行广播。

当我从操纵up脚本中单击此元素时,出现此错误。 TimeoutError: Timeout exceeded while waiting for event at Timeout.setTimeout (node_modules/puppeteer/lib/cjs/puppeteer/common/helper.js:124:28)

但是根据我在此点击事件发生后拍摄的屏幕截图。

const element = await page.waitForSelector('[class="test-class"]', { visible: true }); await element.click();

是否有任何错误提示?

0 个答案:

没有答案