internet 's / Leadfoot's超时函数的区别

Difference between Intern's / Leadfoot's timeout functions

本文关键字:区别 函数 internet Leadfoot 超时      更新时间:2023-09-26

Leadfoot有setTimeout()方法,它接受'script', 'implicit'或'page load'作为参数,但它也有setPageLoadTimeout()和setFindTimeout()。setFindTimeout和隐式有什么区别?setPageLoadTimeout和页面加载有什么区别?这两种方法都用是不是过度了?一个比另一个好吗?

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

创建了专门的方便函数,因为它们更清楚地说明了它们实际做的事情:setFindTimeoutfind调用设置超时,setExecuteAsyncTimeoutexecuteAsync调用设置超时。