Selenium Framework for Beginners 19 | Selenium TestNG How to get data from Excel using DataProvider
У вашего броузера проблема в совместимости с HTML5
Today we will learn How to get data from Excel using DataProvider of TestNG
REFERENCES
How to use excel for getting data
https://www.youtube.com/watch?v=CV3SOorFydE
Today we will learn
1. How to get test data from excel
2. How to create excel data provider function
3. How to use testNG @DataProvider
4. How to refer test data from DataProvider
5. Run a sample data driven Selenium Test
helpful tips
Prerequisite
Add excel reading libraries (Apache POI)
Create functions to read data from excel
Watch the video - https://www.youtube.com/watch?v=CV3SOorFydE
How to get test data from excel
Step 1 -Create a function to get Row Count
Step 2 - Create a function to get Column Count
Step 3 - Create a function to get String cell data
Step 4 - Create a function to get Numerical cell data
How to create Excel Data Provider function
Step 1 - Create a new class ExcelDataProvider
Step 2 - Create a function and create object for ExcelUtils
ExcelUtils excel = new ExcelUtils(“excelpath”, “sheetname”);
Step 3 - Get row and column count
int rowCount = excel.getRowCount();
int colCount = excel.getColCount();
Step 4 - Run a loop to get all data in an Object Array
How to use testNG @DataProvider
Step 1
Create a function and provide testNG annotation
@DataProvider(name = “testData”)
Step 2
Call the excel data provider function with excel and sheet name
Step 3
Return the data object
How to get test data from excel
Step 1 Create a function and provide testNG annotation
@Test(dataProvider = “testData”)
Step 2 In the function arguments, get input parameters equal to the parameters in the excel file
Step 3 Use the values in your test
#SeleniumDataDrivenFramework #SeleniumTestNGFramework #SeleniumTraining #SeleniumBeginnerTutorials
PLAYLISTS
SELENIUM JAVA FRAMEWORK BEGINNERS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8oRay6qeS70vJYZ3SBQnFa
KATALON STUDIO
https://www.youtube.com/playlist?list=PLhW3qG5bs-L_D4ZePNNjvmIULuu6mBHbu
SELENIUM BEGINNERS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L_s9HdC5zNshE5Ti8jABwlU
SELENIUM TIPS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L-QcWg_3niY8_czGfYT6QZb
SELENIUM PYTHON
https://www.youtube.com/playlist?list=PLhW3qG5bs-L9JjtXx-adxWdbjaxeRhi7h
SELENIUM BUILDER
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8X5gd41T_BgebxSVtzRNt9
JAVA
https://www.youtube.com/playlist?list=PLhW3qG5bs-L_qj1L5hnHvJYeFpQ_g4UuU
JAVA TIPS & TRICKS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8SGvNCb9Nj66JZkWPwfZFc
JENKINS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L_ZCOA4zNPSoGbnVQ-rp_dG
JENKINS TIPS & TRICKS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8T-0JT464rkIvnUz5q4CQC
JMETER BEGINNER
https://www.youtube.com/playlist?list=PLhW3qG5bs-L-zox1h3eIL7CZh5zJmci4c
JMETER INTERMEDIATE
https://www.youtube.com/playlist?list=PLhW3qG5bs-L-PpK83CC_m_bWd_722tvgk
JMETER ADVANCED
https://www.youtube.com/playlist?list=PLhW3qG5bs-L_Eosy1Nj1tKHC5jcBAVkPb
JMETER TIPS & TRICKS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L-oMT1Cnrurt7gEaLrRub2V
SOAPUI
https://www.youtube.com/playlist?list=PLhW3qG5bs-L-Bt9T_bnyflQ0Te4VgFhKF
POSTMAN
https://www.youtube.com/playlist?list=PLhW3qG5bs-L-oT0GenwPLcJAPD_SiFK3C
GIT & GITHUB
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8OlICbNX9u4MZ3rAt5c5GG
DOCKER
https://www.youtube.com/playlist?list=PLhW3qG5bs-L99pQsZ74f-LC-tOEsBp2rK
ROBOT FRAMEWORK
https://www.youtube.com/playlist?list=PLhW3qG5bs-L9l2I8K8dEhw6HXy-Z-33w3
WEB SERVICES (API)
https://www.youtube.com/playlist?list=PLhW3qG5bs-L9E2KV6vVdB-YTk-sRxmRAB
REDIS BEGINNER TUTORIALS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8n1fsiT8z_VnDhnUk4vaVq
MAVEN
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8XkBrI-G5aTUo6QwEEoVcj
MISC
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8nTyDWDO24lXFLptaqrAKZ
TOOLS & TIPS
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8dQYImOOArI1jaofMCc4hb
QnA FRIDAY
https://www.youtube.com/playlist?list=PLhW3qG5bs-L8r3wdQ3evX9mIZpHuwiDAj
SUNDAY SPECIAL
https://www.youtube.com/playlist?list=PLhW3qG5bs-L83XJnJyqvVdOjIaYlXSvUx
ALL PLAYLISTS
https://www.youtube.com/channel/UCTt7pyY-o0eltq14glaG5dg/playlists?sort=dd&view=1&shelf_id=0
Like on FACEBOOK :
https://www.facebook.com/automationstepbystep
Follow on TWITTER:
https://twitter.com/automationsbs
Subscribe on YOUTUBE :
http://youtube.com/automationstepbystep
----------- Connect with Raghav ------------
Website - https://automationstepbystep.com/
LifeCharger - http://lifecharger.org/
Udemy Courses - https://www.udemy.com/user/raghav-pal-3/
Facebook - https://www.facebook.com/automationstepbystep
Twitter - https://twitter.com/automationsbs
Youtube - http://youtube.com/automationstepbystep
Like, Subscribe & Share
You can support my mission for education by sharing this knowledge and helping as many people as you can
________ ONLINE COURSES TO LEARN ________
https://automationstepbystep.com/