Skip to main content
deleted 7 characters in body
Source Link

I think the Page Factory is an extension of the Page Object Model. This Selenium documentation page describes with examples what the Factory adds.

If you use the PageFactory, you can assume that the fields are initialised. If you don't use the PageFactory, then NullPointerExceptions will be thrown if you make the assumption that the fields are already initialised.

Guess that is the biggest win.

Personally I couldn't really care for the PageFactory, just adds magic and makes stuff more complex for new developers/testers.

Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.

Read more here: https://raw.githubusercontent.com/wiki/SeleniumHQ/selenium/PageObjects.mdhere...

I do love the Page Objects because it lowers maintenance and makes the tests more readable.

I think the Page Factory is an extension of the Page Object Model. This Selenium documentation page describes with examples what the Factory adds.

If you use the PageFactory, you can assume that the fields are initialised. If you don't use the PageFactory, then NullPointerExceptions will be thrown if you make the assumption that the fields are already initialised.

Guess that is the biggest win.

Personally I couldn't really care for the PageFactory, just adds magic and makes stuff more complex for new developers/testers.

Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.

Read more here: https://raw.githubusercontent.com/wiki/SeleniumHQ/selenium/PageObjects.md

I do love the Page Objects because it lowers maintenance and makes the tests more readable.

I think the Page Factory is an extension of the Page Object Model. This Selenium documentation page describes with examples what the Factory adds.

If you use the PageFactory, you can assume that the fields are initialised. If you don't use the PageFactory, then NullPointerExceptions will be thrown if you make the assumption that the fields are already initialised.

Guess that is the biggest win.

Personally I couldn't really care for the PageFactory, just adds magic and makes stuff more complex for new developers/testers.

Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.

Read more here...

I do love the Page Objects because it lowers maintenance and makes the tests more readable.

Source Link

I think the Page Factory is an extension of the Page Object Model. This Selenium documentation page describes with examples what the Factory adds.

If you use the PageFactory, you can assume that the fields are initialised. If you don't use the PageFactory, then NullPointerExceptions will be thrown if you make the assumption that the fields are already initialised.

Guess that is the biggest win.

Personally I couldn't really care for the PageFactory, just adds magic and makes stuff more complex for new developers/testers.

Within your web app's UI there are areas that your tests interact with. A Page Object simply models these as objects within the test code. This reduces the amount of duplicated code and means that if the UI changes, the fix need only be applied in one place.

Read more here: https://raw.githubusercontent.com/wiki/SeleniumHQ/selenium/PageObjects.md

I do love the Page Objects because it lowers maintenance and makes the tests more readable.