为什么 ElementsCollection 的 waitUntil 方法受到保护?

Why is the waitUntil method protected for ElementsCollection?

如您在文档中所见,waitUntil 方法受保护 ElementsCollection:

http://selenide.org/javadoc/3.7/com/codeborne/selenide/ElementsCollection.html

SelenideElement 不是这种情况,例如:

http://selenide.org/javadoc/3.7/com/codeborne/selenide/SelenideElement.html

为什么 ElementsCollection 的方法受到保护?

我认为这背后的想法是应用 waitUntil + visible/disappear/hasText/etc 是有意义的。 单个元素的条件组合,但对元素集合完全无用,并且可能存在错误。

考虑到它可能带来的性能成本,无法设置在您等待时应该消失或出现多少元素 - 这是正确的决定。