实习生/Leadfoot 的超时函数之间的区别

Difference between Intern's / Leadfoot's timeout functions

Leadfoot 有方法setTimeout() which takes 'script', 'implicit', or 'page load' as parameters, but it also has setPageLoadTimeout(), and setFindTimeout()。 setFindTimeout 和 implicit 有什么区别? setPageLoadTimeout 和页面加载有什么区别?两者都用是矫枉过正吗?一个比另一个好吗?

专用方法 setPageLoadTimeoutsetFindTimeoutsetExecuteAsyncTimeout 都调用 setTimeout(参见 https://theintern.github.io/leadfoot/Session.js.html#line2198)。您可以使用专用方法或通用方法 setTimeout,但通常使用专用方法。

创建专门的便利函数是因为它们更清楚地说明了它们的实际作用:setFindTimeout 设置 find 调用的超时,setExecuteAsyncTimeout 设置 executeAsync 调用。