> For the complete documentation index, see [llms.txt](https://bharateeshd.gitbook.io/seleniumatoz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bharateeshd.gitbook.io/seleniumatoz/framework/building-framework/packages/factory.md).

# Factory

This package has only one class `PageinstancesFactory.java` and this class can be used to initialize our page objects by passing the class that we want to initialize.

```java
GooglePage googlePage = PageinstancesFactory.getInstance(GooglePage.class);
```

We can also create page objects even by calling their constructors.

```java
GooglePage googlePage = new GooglePage(WebDriverContext.getDriver());
```
