Part 2: Selenium with Python | Hybrid Framework Design from scratch | PyTest, POM & HTML Reports

preview_player
Показать описание
Selenium with Python
Design Hybrid Framework From Scratch (PyTest, Page Object Model, HTML Reports)
-------------------------------------------------
1) Read common values from .ini file
2) Adding logs
3) Run Tests on Desired Browser/Cross Browser/Parallel
4) PyTest Report Generation
5) Data Driven Test Case using (Openpyxl package)

Pre-requisites:
-----------------------
Please watch my python programming & Selenium playlist videos. Links given below.

#########################
Udemy Courses:
#########################

Manual Testing+Agile with Jira Tool
************************************

Selenium with Java+Cucumber
********************************

Selenium with Python & PyTest
********************************

Selenium with python using Robot framework
****************************************

API Testing(Postman, RestAssured & SoapUI)
*****************************************

Web & API Automation using Cypress with Javascript
********************************************

Playwright with Javascript
**************************

Jmeter-Performance Testing
************************

SDET Essencials(Full Stack QA)
*************************

Appium-Mobile Automation Testing
************************************

Java Collections
*****************

Python Programming
*********************

Cucumber BDD Framework
***************************

Protractor with Javascript
***************************

####################################
Youtube Playlists:
####################################

Manual Testing & Agile
***********************

SQL
*************************

linux & Shell Scripting
**********************

Java
**********************

Selenium With Java+Cucumber
********************************

Python
********************************

Selenium With Python,Pytest&Behave
***************************************

Selenium With Python Using Robert Framework
(Web&API Testing)
*************************************************

API Testing (Postman,SoapUi,&Rest Assured)
**********************************************

Mobile App Testing Appium
****************************

Performance Testing Jmeter
*******************************

Maven,Jenkins,Git,Github,CI/CD
*******************************

SQL,DB Testing&ETL,Bigdata
*******************************

JavaScript Based Automation Tools
********************************

Selector Hub Tools
********************

GraphQL
******************

Cypress API Testing
********************

Cypress Web Testing
**********************

Playwright with Javascipt
**************************

#SeleniumPython
#AutomationTesting
#HybridFramework
#PyTest
#POM
#HTMLReports
#TestAutomation
#WebAutomation
#PythonScripting
#QAEngineering
#SeleniumFramework
#CodeQuality
#PageObjectModel
#TestScripts
#SeleniumTips
#TestDesign
#AutomatedTesting
#QualityAssurance
#SeleniumTutorial
#TestDrivenDevelopment
#HybridTestFramework
#WebTesting
#AutomationBestPractices
#PythonSelenium
#SeleniumWebdriver
#TestingSolutions
#TestReporting
#SeleniumTricks
#SeleniumLearning
#QACommunity
#SeleniumProjects
#CodeOptimization
Рекомендации по теме
Комментарии
Автор

if the logger do not work use this
class LogGen:
@staticmethod
def loggen():
logger = logging.getLogger()
fhandler = logging.FileHandler(filename='.\\Logs\\automation.log', mode='a')
formatter = - %(name)s - %(levelname)s - %(message)s')

logger.addHandler(fhandler)

return logger

Daniel-zqnx
Автор

Firstly, i will thank u 🙏 for making this content FREE in Youtube, even Udemy courses of python selenium does not have this kind of detailed explanation(on Hybrid Framework)..as far as i know..
This will really help me to (get job or Attend interview) to support my family..
Once again thanks a lot...

Rameshkumar-tnwp
Автор

# It is hook for Adding Environment info to HTML Report
def pytest_configure(config):
metadata =
if metadata:
from pytest_metadata.plugin import metadata_key
Name'] = 'nop Commerce'
Name'] = 'Customers'
= 'Durga Prasad Devarakonda'

# It is hook for delete/Modify Environment info to HTML Report

def pytest_metadata(metadata):
metadata.pop("JAVA_HOME", None)
metadata.pop("Plugins", None)

durgaprasaddevarakonda
Автор

Unfortunately, Logger not works as described in tutorial... I found work around:
logger = logging.getLogger()
fhandler = logging.FileHandler(filename='mylog.log', mode='a')
formatter = %(levelname)s: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')

logger.addHandler(fhandler)

gennadiygar
Автор

This is the best tutorial for automation I have ever seen. Thank you Sir!

aditiupadhyay
Автор

Teaching is an ART here pavan sir is the master of this art automation

manikandanv
Автор

minimal changes in customlogger.py if facing any issues to view the log info -

import logging


class LogGen:
@staticmethod
def loggen():
logger = logging.getLogger()
fhandler = logging.FileHandler(filename=".\\Logs\\"+"automation.log", mode='a')
formatter = %(levelname)s: %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p')

logger.addHandler(fhandler)

return logger

sowmyak
Автор

Sir, great teacher you are, thanks a lot for making these content FREE, lots of love from us.

mayankgupta
Автор

Thanks alot sir this is the much required series

amolmandloi
Автор

Thanks a lot! Videos are really useful.Simple and straight forward explanation.

gello
Автор

Anyone having issues with the log file not being created, nor capturing any logs.
Use this fix mentioned by @Anil Kumar, and it will work:

import logging

class LogGen:
@staticmethod
def loggen():
logger = logging.getLogger()
fhandler = logging.FileHandler(filename='.\\logs\\automation.log', mode='a')
formatter = - %(name)s - %(levelname)s - %(message)s')

logger.addHandler(fhandler)

return logger

karthiksivakoti
Автор

pytest -v -n=2 --html=Reports\report.html testCases/test_login.py --browser chrome
remove -s for to see log files in HTML Report

Daniel-zqnx
Автор

this is amazing, it only need upgrade due to changes in find element method...

aramide
Автор

Hi Pavan,
Your explanation is excellent!! . thank you very much for posting these videos. also could you please let us know how to add failure tests screenshots to the html report

dantuluriraju
Автор

Great video series thanks for your efforts 😄

nileshgadekar
Автор

Please share the document from which you are reviewing the steps sir. It would be really helpful! Thank you!

chaithrakathirki
Автор

Hi sir, I'm following each step of yours but when I copy the absolute path for "Logs" folder once both test cases finished and passed I don't get any logs saved in that folder, I'm on a macBook pro, not windows, do I need to do something different or import some other modules in the "customLogger" file? Thank you!

georgeberes
Автор

I can successfully implement this framework and very thank ful to you. Can you please guide, which files needs to be changed to add multiple url ? and find more elements in each url ? Thank you

namratabedare
Автор

Thank you so much sir, huge respect for you. Got 1 problem, I ran the login test successfully, but the log file is not getting generated. I am using Visual studio code. Please advice.

dilipgaikwad
Автор

Thank you so much sir, you are the most generous knowledge sharing person I've ever seen!

angelinawang