我正在编写实习生 4 功能测试。当我尝试使用 pollUntil 它是未定义的
.findDisplayedByCssSelector('button.primary')
.then( el => pollUntil(function(pollEl) {
if( pollEl.isEnabled() ) return true;
return null;
}, el, 300000 )
错误:
chrome 63.0.3239.132 on Windows NT - Test - do create (0.352s)
ReferenceError: pollUntil is not defined
at Command.remote.findDisplayedByClassName.findByXpath.click.clearValue.type.end.end.findDisplayedByCssSelector.then.end.findDisplayed
我尝试了各种方法来导入 pollUntil 函数,例如
const { pollUntil } = require('leadfoot/helpers/pollUntil');
没有一个工作。
有人对如何访问 pollUntil 有提示吗?