premganz / SeleniumPageObjects

An implementation of the Page Object Pattern in Selenium along with a bunch of other features like KeyWords for oft used Webdriver calls, driver lifecycle management, effective logging and Test Script Templates
Other
2 stars 1 forks source link

Need Configurability in PageFactory for mapping beans to xml names #55

Closed premganz closed 6 years ago

premganz commented 6 years ago

This is following a problem with some pages enlisted in the nav.xml file, being unbacked by any bean. This results in cases where the page does not get much needed feature despite well known heirarchy of the target page. So just by putting a special flavour of a specific page into the nav.xml page (often for multipage validation), one looses reaching the Page bean therefor. bringing inheritence tree into the xml would make things complicated. We would not also want to hardcode the page names in xml to specific beans to be supplied by the factory.

A preferred way is to allow the getDefaultPage() of the factory, configurable by the name of the page requested in the getPage(). So getDefaultPage would have to parametrized by a String arg. This makes a variety of default pages possible. thus the idea of having configurability could be accomodated in the existing semantics by this fix

premganz commented 6 years ago

done 1.12.0