Our team is currently debating whether or not to prohibit the exposure of "ElementFinder" and "ElementArrayFinder" in our Page Objects.
The main point of contention is a quote by Simon Stewart. Page Objects Done Right - selenium conference 2014 (page.7)
If you have WebDriver APIs in your test methods... You're doing it wrong.
According to SeleniumHQ/selenium/PageObjects https://github.com/SeleniumHQ/selenium/wiki/PageObjects
The approach is appropriate for transition functions that return another Page Object or when multiple selections are made on one Page in order to chain these calls.
However, for simpler tasks, there is a lot of unnecessary boilerplate code required to test for the existence of an element and its text.
In my opinion, creating mimic functions of "ElementFinder" doesn't make much sense. It is often faster and more readable to expose the element and use built-in functions of "ElementFinder" such as ".getText()". Do you think it would be better to make the element private and only expose the "getElementText()" function?
What is the best practice - should we prohibit the exposure of "ElementFinder" and "ElementArrayFinder" in Page Objects?