0

As you can see in the documentation, the waitUntil method is protected for ElementsCollection:

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

This is not the case for SelenideElement for example:

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

Why is the method protected for ElementsCollection?

Eldy
  • 1,027
  • 1
  • 13
  • 31

1 Answers1

1

I think the idea behind this is that it make sense to apply waitUntil + visible/disappear/hasText/etc. Condition combination for single element, but totally useless to collection of elements and potentially buggy.

There is no way to set how many elements should disappear or should appear while you are waiting, taking in account performance cost it may bring - that was the right decision.

dmle
  • 3,498
  • 1
  • 14
  • 22
  • When I asked this question, I was thinking about doing something like "wait until the collection size is superior or equal to x". But I guess It makes more sense from this point of view. – Eldy Nov 16 '17 at 09:38
  • I'm pretty sure its possible to solve this with another custom condition, but as I said performance/stability may become a pain. so from testing perspective I think it better to wait for more strict condition and then (if still needed) go with `collection.shouldHaveSize(size);` – dmle Nov 16 '17 at 09:53
  • I didn't considered the performance issue, thanks for your answer. – Eldy Nov 16 '17 at 10:08