I am running into a situation where the standard page object design is one-dimensional. These pages are very large and contain many (mostly unique) page sections.
The existing corpus of page objects look like this:
this.pageHeaderLogin = $$('div.header > a.login');
this.pageHeaderSignUp = $$('div.header > a.signup');
this.pageHeaderContact = $$('div.header > a.contact');
this.pageIntroSectionTitle = $$('div.intro > span.title');
this.pageIntroSectionText = $$('div.intro > span.description');
and so on, with as many as 50-100 elements, all immediate children of this
.
It seems to me a much better structure would not be one-dimensional, but rather compartmentalized similar to how the page itself is structured. So I'd prefer to do a page object like:
this.pageHeader.login = $$('div.header > a.login');
this.pageHeader.signUp = $$('div.header > a.signup');
...
this.pageIntroSection.title = $$('div.intro > span.title');
and so on.
Unfortunately I've been told this is too complex. I'd like to make an argument that it isn't only not complex, but actually more organized, but all the examples out there for page objects are too small to illustrate anything beyond one-dimensional structure.
Can someone point me to good examples of a non-one-dimensional page object that I can use as a reference to show the benefits of this design?