RE: validating a POM framework page
How can I validate that in my Page object model framework my page is valid
and my url to load page is up and running.
I need to perform this before instantiating the page class because if I found that my page is invalid / my url is not up then I can return with exception before creating object of my Page Class
Amit, It seems that what you are looking for can be done after you do instantiate a page object. PageFactory intializes all the elements to null when it doesnt find the elements of correct page. Use this property and create a method inside the page factory which return you true or false based on if all the elements in the page factory are not null.
public void isPageFactoryValid()
if(Element1 != null && element2 != null && element3!= null)