Testcafe问题:withText不是函数

问题描述 投票:0回答:1

这里的菜鸟编码器,不要假装其他任何东西。

我正在尝试在Testcafe中编写选择器,并且根据文档(据我所知),这应该可以,但是它返回错误:

await t.click(Selector('span').withtext('Pending Applications').find(a.field-link.external-link))

返回的错误是

TypeError: (0 , _exportableLib.Selector)(...).withtext is not a function

我做错什么了吗?

testing automation automated-tests e2e-testing testcafe
1个回答
0
投票

您的代码中有小错字。您必须使用“ withText()”而不是“ withtext()。

© www.soinside.com 2019 - 2024. All rights reserved.