Designing Hybrid Framework in Automation (Part-2)

We have already discussed the implementation part of our Hybrid Framework(Part 1),Now we are going to focus on the the new enhancements that we have introduced while converting our keyword driven framework to hybrid framework.

New Capabilities:-
   1. Data drive the test (Parameterization)meaning running the same test case with varying set of data.
For this we implemented the concept of HLookup in Excel
Most crucial factor is taking our test data from from “Data” sheet of Excel.
Data Sheet in Hybrid Framework
Example: – Incase we wont to Launch “chrome” browser, in the “Value column” i.e. F3 cell of the sheet(Keyword) we would fetch data from “Data” sheet of our excel by using the following formula:-
HLookUp in Excel in UFT


  • we have used cell F2 ( named as STARTROW) to change the test data, like incase we want to run the test case for both browsers(IE and Chrome) we would change its value to 2, else we can mark it as 3 for running our test case only on chrome browser.
  • Further we have created Name Manager (of Excel) to set the range of “DATASHEET” .

          2.Error handling with user having flexibility to take screenshots incase of errors
In the properties of test case(open test in UFT to set Properties), user can set the value NO or Yes based on the preference whether screenshots are required or not.
Path: – Screenshot are saved in the word document at following location
Screenshot path in UFT
Note: – We have placed the corresponding code in “Word” library of the test case.

        3.Email options to send run status mail after execution
We have created a basic template structure of email to inform stakeholders for the run results (Please enhance this feature as per your requirements)
Code: – Email library of the test case contains the code
Note: – We have used outlook object for this purpose

Before using this feature please change the To and CC email id’s inside “fn_StopTest” (inside FrameworkRun library).

        4.  Code optimization with driver scripts just contains the call to triggering function
‘Driver Function call

          5.Better structuring of code into function libraries like Word,Email,Excel
This part is just extension of above point(4) .

We have segregated our code into logical divisions by creating appropriate libraries.
Test Case structure in Hybrid Approach
       6. Improvement in error reporting through UFT result viewer.
Our result viewer contains improvement in reporting.

Note: – We thought of creating Executionlogs for the run rather than using result viewer of UFT by using notepad file or any text editor ( we might be working on this in future.)

UFT Tutorials
Learn Selenium

Leave a Reply

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