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] | Test@email.com | |
TC002 | Enter Password | enterValue | //div[@id=’pass’] | pass@word | |
TC003 | Click on Login | clickHere | //div[@id=’LoginButton’] |
When?
Not For?