Selenium Page Object (PO) and Key Word Driven Framework

Murko Agom picture Murko Agom · May 7, 2015 · Viewed 8.3k times · Source

I am a novice in Selenium, need some advice.

As I understand, in Page Object, we must create a Java class for each page. In Keyword Driven Framework, we need to create a generic module, which based on input key perform an action based on the predefined rule(s).

My question is when we implement a keyword driven framework, is page object not an option anymore? Can a keyword driven framework and Page Object implementation co-exist?

Answer

Andreas Waldahl picture Andreas Waldahl · May 7, 2015

Yes they can coexists.

Whatever way you want to test I see Page Object as the foundation. It lower the maintainance cost a lot.

Keyword driven Framework is created as a higher abstraction layer so that non-technical easier understands the test case design. Such as a function named login explains that it will login. This login function then uses the Page Objects to create element calls.

So Page Object is only a lower level of abstraction to make it easier to create test cases.

http://www.ranorex.com/blog/keyword-driven-test-automation-framework

This link explains what keword driven is.