Class which create object of classes
I'm new and I'm learning webdriver and java:) I have beginner question. I created classes whit locators(findBy) and methods working with this locators ( senKeys() , click() , etc.) - I use pagefactory . HomePage LoginPage ... My main class AddNewLeadTest is a class where i initialize method from classes with locators, and I do it like this: HomePage hp = new HomePage(driver); hp.loginButton.click() I would like do to this like this: HomePage.loginButton.click() It's faster and I will not have to create in AddNewLeadTest new object for everyone xxxPage class. How should I write class/method to