Understand Keyword Driven Framework by using UFT – (Part 3) – User friendly Tech help
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.
n
nDo follow us on Fb,G+,Twitter for more topics.
n
nKeyword Sheet:-
n
KeyWord Sheet |
n
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.
n
nMainWindow:- It is the parent object of the AUT (Like Browser in Web application)
n
nScreen :- Child objects, here we can separate the hierarchy of objects by “;” until our action object.
nExample:-
nWe have object with following hierarchy :-
nBrowser(“test”).Page(“test”).Frame(“test”).WebEdit(“test”)
n
- n
- Webedit is our action object.
- MainWindow :- Browser object
- Screen :- Page Object; Frame object
n
n
n
n
So thus as child hierarchy increases we need to separate the objects by “;” and add to Screen column.
n
nKeyword:- Operation to be performed on the Action object
nExample:-
n1.COMMENT :- This keyword just adds “Test Details” to the result viewer.(Action object is blank here)
n2.LAUNCH :- It launches our Browser Application (Action object is blank here)
n3.IN:SET :-It is a input operation of setting a value into edGoogleSearch (Action object)
n4.IN:CLICK :- It is again clicking on the button object
n5.CHECK:ALT :- It is a Check operation,which tries to match the actual “ALT” property of the action object with the Expected value.
n6.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.
n
nNote:- Keyword annotation are user created, we can modify the same as per our requirement and something which is more meaningful.
n
nObject:- 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”.
n
nValue :- It contains our main parameter that need to be passed to the keyword to perform event on the action object.
nExample:-
n1.LAUNCH keyword have value = “iexplore.exe“, thus it opens IE browser
n2.IN.SET keyword have value = “uftHelp”, thus it sets this value into the Action object(edGoogleSearch)
n
nParam1/Param2:-
nIt contains any aditional paramters that need to be passed to the Keyword to achieve the task
nExample:-
n1.Launch Keyword(refer row-3 in the image above), contains “Param1”, which points to the URL of the application
n2.CHECK:ALT Keyword it contains “=” as “Param1”, which is used to compare the value of the Title.
n
nReporting:-
nWe 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.
n
n
Result Viewer for Reporting |
n
n
nHope 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.