Understand Keyword Driven Framework by using UFT – (Part 3)

We are on the last step of completion of our “Keyword Driven Framework“.we hope you are quiet comfortable with our last tutorials on architecture of Keyword Driven Framework-Part 1 and its various components with working code in Keyword Driven Framework- Part 2, before arriving on the final step.Here we are discussing the last component of our framework i.e our Keyword sheet.We would discuss its structure with examples.So that our readers can independently create and design Keyword sheet as per their project requirements.

Do follow us on Fb,G+,Twitter for more topics.

Keyword Sheet:-

Keyword Driven Framework Data Sheet
KeyWord Sheet

Test Details:- It is our Test Step which is performed on the AUT.It adds readablity to our keyword and same message is shown inthe result viewer of UFT.

MainWindow:- It is the parent object of the AUT (Like Browser in Web application)

Screen :- Child objects, here we can separate the hierarchy of objects  by “;”  until our action object.
We have object with following hierarchy :- 

  • Webedit is our action object.
  • MainWindow :- Browser object
  • Screen :- Page Object; Frame object

So thus as child hierarchy increases we need to separate the objects by “;” and add to Screen column.

Keyword:- Operation to be performed on the Action object
1.COMMENT :- This keyword just adds “Test Details” to the result viewer.(Action object is blank here)
2.LAUNCH :- It launches our Browser Application (Action object is blank here)
3.IN:SET  :-It is a input operation of setting a value into edGoogleSearch (Action object)
4.IN:CLICK :- It is again clicking on the button object
5.CHECK:ALT :- It is a Check operation,which tries to match the actual “ALT” property of the action object with the Expected value.
6.SKIPME :- This keyword is just used skip the given step and no action will performed , even no reporting is done for this step unlike “COMMENT” keyword.

Note:- Keyword annotation are user created, we can modify the same as per our  requirement and something which is more meaningful.

Object:- It is our action object(on which UFT would perform operation in the AUT), it can be blank incase no object is required to be passed like “COMMENT’,”LAUNCH”.

Value :- It contains our main parameter that need to be passed to the keyword to perform event on the action object.
1.LAUNCH keyword have value = “iexplore.exe“, thus it opens IE browser
2.IN.SET keyword have value = “uftHelp”, thus it sets this value into the Action object(edGoogleSearch)

It contains any aditional paramters that need to be passed to the Keyword to achieve the task
1.Launch Keyword(refer row-3 in the image above), contains “Param1”, which points to the URL of the application
2.CHECK:ALT Keyword it contains “=” as “Param1”, which is used to compare the value of the Title.

We can use customized reporting as per the project and management requirements.Here are using Result Viewer in reporting with the help of Reporter.Report Event.

Result Viewer reporting in UFT
Result Viewer for Reporting

Hope this framework enlightens our audience with the basic level architecture and implementation of the Keyword Driven Framework.In our Next post we would we modifying this approach to include data driven framework so that we can achieve a our initial target of designing Hybrid Driven Framework.

Leave a Reply

Your email address will not be published. Required fields are marked *