If have have been working with test automation then you would have probably heard of page objects . In a gist, page object provides clear separation of responsibility between who is responsible for testing (test classes) and who is responsible for services provided page (page classes). Page objects are known to return objects of same page when control retains on same page or another page object when operation on one page return object of another page. For example typing in a text box would keep control on same page (hence same page object) but submitting a form with valid data would most probably load a new page (hence a new page object). But what if return type of Page Object is not fixed. For example for A/B variations, user may be directed to one of many possible variation of a page. Hence the resulting page is a page object but you don’t know for sure which age object. This is where java generics comes for rescue, and to be more specific generic methods. Before delving i