Testing Testcafe问题:withText不是函数

Testing Testcafe问题:withText不是函数,testing,automation,automated-tests,e2e-testing,testcafe,Testing,Automation,Automated Tests,E2e Testing,Testcafe,这里是noob编码员,不是假装什么 我正在尝试在Testcafe中编写选择器,根据文档(据我所知),这应该可以工作,但是它返回一个错误: await t.click(Selector('span').withtext('Pending Applications').find(a.field-link.external-link)) 它返回的错误是 TypeError: (0 , _exportableLib.Selector)(...).withtext is not a function

这里是noob编码员,不是假装什么

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

await t.click(Selector('span').withtext('Pending Applications').find(a.field-link.external-link))
它返回的错误是

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

我做错什么了吗?

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


你的代码中有小的输入错误。您必须使用“withText()”而不是“withText()”

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