Question: Selenium Certification Training Course Module 1 0 : Automation Frameworks - II Assignment Brain 4 ce Education Solutions Pvt . Ltd . Module 1 0
Selenium Certification Training Course
Module : Automation Frameworks
II
Assignment
Braince Education Solutions Pvt Ltd
Module : Automation Frameworks II
B r a i n c e E d u c a t i o n S o l u t i o n s P v t L t d Page
Case Study
ABC team is struggling with automation test cases as they cannot perform
automation testing for other ondemand features that are not part of TestNG.
Businesses requested to develop a hybrid framework. The framework is a kind of
structure where we have a set of methods and logic that will allow users to perform
testing with multiple sets of data without any manual intervention. We can create a
set of logic that is not part of TestNG as TestNG is a builtin framework, and
performing changes as per our requirement is not allowed.
Business challengerequirement
Executing test cases with some other features that are not part of TestNG or not
available with TestNG. In case we want to create a userdefined dashboard to
validate the test execution report or in case we have to create annotations of our
demand, those are not part of TestNG and are difficult to add. In case we wanted to
develop userdefined methods and need to add them to the framework, that is also
not possible with TestNG.
Considerations
Java is installed and running on the system.
Project setup has been created.
Element locator value is stable and not changing frequently.
TestNG is installed in your IDE.
Test data is ready and mapped with test cases.
Folder structure is created.
Key issues
Elements are not stable.
Test cases are not implemented, which we want to execute.
Folder structure is not created.
Business benefits
A hybrid framework is a final milestone for any automation journey. This leads
to solving multiple that are unavailable with traditional frameworks like TestNG
or JUnit. We can add any custom method or logic as per our business
requirements. We can create any type of report or user dashboard to validate the
results. We can create logic that will support our daytoday business
requirements, leading to better quality products and generating profit for the
organizations.
Module : Automation Frameworks II
B r a i n c e E d u c a t i o n S o l u t i o n s P v t L t d Page
Approach to solve
As part of the hybrid framework setup, perform the belowmentioned operations:
Create the folder structure for IDE, dependenciesJAR test cases, test data, and
test results.
Start creating the reusable methods under the Methods class inside the
coedurekatraining package and create the belowmentioned methods.
A launchApp: To launch the method by providing a URL and
screenshots path kindly dont hardcode any value in these
methods
B closeApp: To close the browser.
C elementAvailable: To inspect the element by providing element
details, exceptional results, and a screenshot path.
Kindly mention the following: Method Name: launch app Description: To
launch App Author: Your Name Date Created: date when you create
these methods.
Note: Step is purely done on comment, and this is done so that once the tester
leaves the organization, the new resource will quickly understand the functionality of
the method.
Start inspecting all the elements and store them in Page Object Model style
create element repository with @FindBy method We will create one class
for one UI suppose in rediffmail.com you have to work on login functionality
then all your elements must be on one class, and if you have to work on
register functionality, then you need to inspect and store all the elements on
another class. Simply one class for one UI
Note: Create a new class for step with name PageobjHomePage
pageobjHomePageLogin pageobjHomePageregisterPage.
Once the framework structure is available with all the required files, we need
to start designing the test scripts by following scripting standards and using
files in the framework structure.
Note: We are writing one test script in one method in a class. In simple words, one
test case will be written in one method. If you have to work on login functionality,
this should be done on one method.
Create a class named HomePage and create the test cases.
Module : Automation Frameworks II
B r a i n c e E d u c a t i o n S o l u t i o n s P v t L t d Page
Create DriverScript class.
Enhancements for code
Please follow the Java naming convention.
Follow framework conventiontest case convention add validate the results.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
