This question already has an answer here:
I will create automation test project and I have simple question according to navigation in Page Object. For example I have LoginPage and WelcomePage (displayed after login user), and here is a question, in LoginPage class should I return object of WelcomePage after clickLogin(), or I shouldn't return anything and and in test file create WelcomePage and do actions from WelcomePage class? What is the right solution?