Keyword Driven Framework

Automation testing using keywords to wrap the code behind the scenes to create a framework is keyword driven framework. User can interact with the web browsers using the user defined keywords.

In a keyword driven framework, the keywords are mapped with the specific methods in the background. These keywords can be written in csv, xml, etc where the browser interactive elements and required test data are passed. Keyword driven framework needs good amount of framework structuring and documentation to know what each keyword means.

For example:
Lets consider writing down test-case for logging into any application. Here the tes-tcase would be written in a csv, in a user defined patters, using the keywords defined by the user. Here is a simple example where ‘clickHere’ and ‘enterValue’ would be user defined keywords mapped with the selenium click and send keys methods.

Login page object:

Test-case ID Test Step Keyword Input 1 Input 2 Input 3
TC001 Enter username enterValue //div[@id=’email]
TC002 Enter Password enterValue //div[@id=’pass’] pass@word
TC003 Click on Login clickHere //div[@id=’LoginButton’]


  • Reduce user interaction with the code
  • Increasing easiness in writing down new test-cases if all the keywords are know
  • Re-usability of keywords reduces code duplicity

Not For?

  • Learning curve to understand and remember all the keywords and its usage
  • Maintenance can be a major issue when the test-cases increase
  • Debugging failures would be very difficult as this would result in traversing in hundreds of lines in csv

10, March - 2022

Try it now for Free