0% found this document useful (0 votes)
178 views2 pages

Hybrid PDF

The hybrid framework uses a page object model with page classes defined in the pages package that initialize web elements, test classes in the test package that initialize pages and run tests, and a base test class in the base package that contains common methods like launching the browser. It follows a page chaining model where pages are interconnected and tests navigate between pages by calling page methods. The framework utilizes tools like Selenium, TestNG, Maven, and Log4j and stores test data in properties files and Excel sheets.

Uploaded by

Vikash Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
178 views2 pages

Hybrid PDF

The hybrid framework uses a page object model with page classes defined in the pages package that initialize web elements, test classes in the test package that initialize pages and run tests, and a base test class in the base package that contains common methods like launching the browser. It follows a page chaining model where pages are interconnected and tests navigate between pages by calling page methods. The framework utilizes tools like Selenium, TestNG, Maven, and Log4j and stores test data in properties files and Excel sheets.

Uploaded by

Vikash Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Hybrid Framework-

every page contains webobjects/webelement and method/feature Collection of all web object/web
elements is called object reportisty

1. com.qa.pages- page layer(page liberaray)-

Login.java- this will extend testbase class and,define page factory like @Findby(name="username"),
webelement username,validatloginpagetitle()

to initialize page factory, in the construtor,we need to define pagefactory.initelments(driver,this)

login(string un,string pwd) method on clicking the submit buttton this would move to homepage so
this mentod will return new homepage()

homepage.java- will exetend testbase class and define page factory

2.com.qa.test- test layer-

using the testng annotation .every webpage have corresponding testlayer

logintest.java- create constructor and call superclass consturction using super(), @beformethod- call
intialization(). need to create object of testbase class

homepagetest.java- create construction and call superclass consturction using super(),create login
object (Loginpage loginpage)

beforemethod- call initialization, call login() method to reach on homepage so need to define
homepageobject

3.com.qa.base- base class (testbase.java)- parent class of all the class-


webdriver,properties,maximize,deletecookeis,pageloadtimeout,implicitwait,get(url)

write properfile read code in construtor, initialization() will contain to launch the url while reading
driverinfo, url from prop file

4.com.qa.config-config.properties-url,username,pwd,browser,environmentvariable

5.com.qa.testdata-testdata layer-testdate.xlsx

6. com.qa.utils-Testutils- screenshot,sendmail,commonutility,log4j

7. test-output folder- test Report- html/testng/xmlreport

this is also called page chaining model as all the pages are interconnected. for example homepage is
the landing page of login

java ,selenium webdriver,testng,maven,aparchepoi api,extent report,log4japi,jenkins,gitte

Maven is build management tool and if we need to download any api dependency than we can sear
"selenium maven","testng maven" and put them in pom.xml

we put all the things src/main/java and put testcase in src/test/java

package name should be com.crm.qa.pages

properties,create java class for each page


Testcase should be sepearted executed. if we are executing all the testcase with same
browsser.browser can crashed or might be issue to browser cookies or cache.so everytime before
each testcase,launch the broser and login and execute the testcase and closeit

Test runner class- Create one source folder- src/main/resource-> testng.xml

<suitename>

<testname>

<classname>

------------------------------------------------------

Log- capturing all the activities going on during the exectuion of program.

log type- info, Warn, defug, Fatal

log are generated through log4j api

how it works-its read log 4j configuration from log4j.properties files

where to create- inside the resources source folder (create log4j.properties files)

#Root category-debug,console,file

You might also like