I am tried to use "find_elements" method for check if some element exits on the page, but it falls if elements not found, so I added empty array that should be returned by default.
Return empty array on elements not found
Had exactly the same issues, so added similar logic in my pull request.
I agree that this change leads to a cleaner API, but committing it would break compatibility with the old code.
Some users of this module will have written code against the existing interface. Future versions of Selenium::Remote::Driver should not break existing code.
As a compromise, I would suggest creating a new method that behaves as you describe and documenting this as the best approach to use, while retaining the existing behaviour of "find_elements" so existing code contineus to work.
While I disagree about how much to prioritize backcompat, the behavior of blowing-up-if-nothing is found is consistent with the rest of the the interface. Changing the behavior for this one method could cause unexpected results, so this patch should be rejected.
The current behavior is also consistent with the docs, which state under "USAGE (read this first)":
So a rule of thumb while invoking methods on the driver is if the method did not croak when called, then you can safely assume the command was successful even if nothing was returned by the method.