I have questions about clean code. I'm writing a test in Java selenium page factory. I'm a beginner.
I have two "actions", input text into search field and click button search. Now the question is, how should I do it:
In page object class make 2 separate methods:
1st: input text to search, and
2nd: click button.
In main class (test class) make one method which runs these two methods.In main class (test class) make two separate methods which run each of this two methods (input text and click button).
In page object class make only one method where I input text into search and click search button. And later run this one method in the test class.
Which solution is right and/or the best?