DataProvider In TestNG - Data Driven Framework in Selenium - Part 3
Ғылым және технология
Data Driven Framework in Selenium WebDriver with TestNG DataProvider - Part 3: DataProvider In TestNG
+How to use @dataProvider annotation
+How to fetch test data from excel using data provider utility
+How to define @dataProvider with @Test annotation in TestNG
+How to parameterize @Test - Test Case using TesNG- data providers
=====================================================
**Download Excel Utility - Xls_Reader java file:
drive.google.com/file/d/0B2i0...
**Download Apache POI API:
www.apache.org/dyn/closer.lua...
=====================================================
****Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
/ @naveenautomationlabs
Follow me on my Facebook Page:
/ naveenqtpexpert
~-~~-~~~-~~-~
Follow my Site/Blog: www.naveenautomationlabs.com
========================================================
Please watch: "Selenium & Automation Interview Preparation - By Naveen AutomationLabs"
• Selenium & Automation ...
~-~~-~~~-~~-~ Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
kzread.info%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/COJqZUPB02r5sB7...
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p... ➡️Get Our Courses✔️
📗 Get My Paid Courses at
Paid courses (Recorded) videos:
Java & Selenium Course: www.naveenautomationlabs.com/p...
API Course: www.naveenautomationlabs.com/p...
-------------------------------
✔️SOCIAL NETWORKS
Facebook: / naveenqtpexpert
Twitter: / naveenkhunteta
Blog: www.naveenautomationlabs.com
--------------------------------
Support My Channel✔️Or Buy Me A Coffee
Paypal: paypal.me/naveenkhunteta
Google Pay: naveenanimation20@gmail.com
--------------------------------
✔️Thanks for watching!
देखने के लिए धन्यवाद
Благодаря за гледането
感谢您观看
Merci d'avoir regardé
Grazie per la visione
Gracias por ver
شكرا للمشاهدة
Пікірлер: 255
Hello All, Sharing the latest Excel Util - Xls_Reader class used to perform read/write operations on Excel files. This util is having all the latest dependencies as per Apache POI api - 4.x.x version. You can get this util from my GIT Repo: github.com/naveenanimation20/NewExcelUtil2020_ApachePOI/blob/master/src/main/java/com/excel/lib/util/Xls_Reader.java
@virendrakumar-jd6sg
4 жыл бұрын
Thanks a lot
@kavitadhalape312
4 жыл бұрын
can you make video on reading data from json file instead of excel in selenium test
@mjj3tube
4 жыл бұрын
Thanks Naveen ,so this looks like an alternative for Apache poi ,correct me if I am wrong.
@VinayzView
2 жыл бұрын
Hii naveen this video is so helpful and the only issue i have is.... I have to call a mobile number & the code is like getNumericCellValue which is returning me double value.. can you please help me out by changing it to int or long?? I tried type casting ,wrapper classes & math round.. any other possible way??
@abhay6276
Жыл бұрын
@@kavitadhalape312 excel mai kya problem hsi sister?
How cool it is !! We are going to read data from Excel to DataProvider and then that DataProvider is going to feed data to various methods in application for Processing. Thank you Naveen !!
@6:16 Creating a class inside package which is consisting Datadriven Test. @6:53 A code to invoke browser and opening a site using @BeforeMethod annotation. @9:06 A code to quit browser using @AfterMethod annotation. @9:49 Writing testcase for locators of the site input fields. @14:03 Passing suitable parameters for testcase. @15:58 Using DataProvider annotation to pass data to the testcase. @17:03 Creating a utility package and inside that package, creating a class. @17:32 Importing opensource Arraylist method inside class belonging to utlity package. @20:00 Giving Excel sheet to the class belonging to utility package. @21:22 Correcting "for" loop according to Excel sheet. @24:43 Creating an object array to store existing String values. @25:52 Adding the object array into the arraylist. @28:03 Calling that Arraylist method into DataProvider annotation of testcase @29:05 Writing an method to iterate an arraylist. @30:40 Passing Iterator method from DataProvider annotation inside testcase @34:48 Running the code.
I have viewed about 10 different instructors videos but among them all Naveen Sir's videos are top on the List, the way explanation given is really kool Thank you Very Much sir for your Greatest Help
Thank you so much Naveen. Very helpful. Your are spot on. Detailed Explanation. Anyone can Understand. Data Provider concept is required for my full project.
Hello Naveen Sir, Namaste, I am the Big Fan of you Sir, You have posted this video 3 years back but still helping me and like such kind of students lot of there. Really clear explanations sir. You have put the seeds before 3 years it will grown today as big tree we peoples are utilizing like shadow. Your are big contribution in Testing Industry Sir. Thank for your once again. Please Keep Posting Sir. :)
The content is amazing and gives an in-depth insight into the concepts involved. Thank you!
I'm getting ample amount of knowledge watching your videos Naveen. A big thumbs up to you.
Hey, Naveen you have explained the complex topic in the simplest possible way. Kudos to ur explanation.
One word sir,, you are just an amazing PERSON!!!1
Nicely explained Naveen, keep it up with good work.
Amazing tutorial Naveen sir, thanks a lot , such a complex topic is explained in such a simple way
Thanks Naveen for the tutorial. Its really helpful.
Thank you soo much for explaining this in detail. it helped me alot...👍😊
Very brilliant explanation and so easy to understand. Thanks a lot.
Thank you Naveen...such a wonderful video i have ever seen. Clearly explained point to point. Thank you so much
Very Crisp & Clear Explanations, Thank u, Naveen.
Thank you,it was a very good explanation about TestNg
Very informative video man. Thanks
Thank you Naveen.....Superb teaching.
Thanks a lot for sharing such wonderful videos. It means a lot.
Thanks you for providing the in detailed explanation on Data Provider :)
Thank You Naveen....Can't thank you enough.
Thanks a lot Mr. Naveen garu.
Very good explanation...really helpful for complex topic to get clear properly..
@kenjalgundecha5870
6 жыл бұрын
Hello Naveen could you please tell me from where can i download that excel utility package to use Xls_reader class
@reachmohammedashfaq8306
5 жыл бұрын
Hello @@kenjalgundecha5870 , you can get Xls_reader class here, github.com/naveenanimation20/SeleniumJavaCourse/blob/master/src/com/excel/utility/Xls_Reader.java . its basically a custom call that Naveen has written for the AUT.
Hi Naveen, firstly, I follow all your videos of selenium tutorials. And they all are very clear with excellent explanation. Would like to say thank you for that. Secondly with this video above how do you do validation of the testcase. Please explain. Thank you
U r awesome bro.very helpfull
Thanks sir ,it really help me Could you share some java related interview questions
Thank you so much naveen you cleared my doubt by watching these amazing videos I really appreciate you brother.
@naveenautomationlabs
3 жыл бұрын
You're most welcome
Thanks for this video.
Very Simply and clearly explained Thanks Naveen.
@naveenautomationlabs
3 жыл бұрын
You're most welcome
So smoothly explained...
Amazing lecture sir, thanks a lot❤
Hi! Thanks for clear explanation. I have a question, what about if the browser will not close during the suit session? how to clear it quickly ?
Hi naveen, Thank you, Excellent tutorial, I like it. without TestNG also the DDF are using in the industry ? TestNG is mandatory skill? Kindly suggest us.
This video is very helpful for me. Actually I am searching for something how to read multiple data sets parallely from Excel using same class/multiple classes whatever possible. Can we achieve this using data driven frame work? Or else any other frame work will help? Please help me..
Thank you so much Naveen!
very easily understand thanks navin
Hi Naveen,your channel is very useful for me ,in ma automation domain. I have a doubt, using this same class, i want to iterate next rows but taking values from different sheets with same rowcount number. is this will be perfect solution?
Thanxu brother it was really helpful.
Thank You !
Hi Naveen, When we are working on end to end testing, we work on multiple pages and for every pages we have to pass different test data. e.g. we login the page and go to second page and do some verification and go to third page do some calculation and verify the result. As we are not passing multiple set of data for one page and we are dealing with multiple page at one time, In this case which framework(Data Driven, Hybrid etc.) will be suitable? Or how we can achieve this using framework structure?
thank you Sir
Hi naveen, shouldn't we use next() to iterate over the elements? How can it directly get access to all the element?
Hey Naveen, Thanks for sharing the tutorial. Can you please let us know how can we call the method which is having data provider associated with it.
Thanks, Hi Naveen, I have one question, I have multiple tests and I want to execute all tests in first iteration and likewise all tests in everyiteration rather than just Test1 being executed multiple times, Because in my framework Test1 take a url, client from excel and other tests are verifying various pages based on the url and client chosen in Test 1, how to implement that ? There is not even a single tutorial on this, everyone has a single test scenario.
Naveen Garu your explanation is good..more useful to all..please make a video for interview questions..it will be more helpful for us.
@naveenautomationlabs
6 жыл бұрын
+Lakshmi Ch Thanks Lakshmi. Ya I'm working upon it. Selenium Interview questions video will be uploaded soon. Plz subscribe the channel and press the bell icon to get the notification. Thanks
@lakshmich3208
6 жыл бұрын
Naveen AutomationLabs Naveen Garu is there any other advanced topics in selenium..
@naveenautomationlabs
6 жыл бұрын
Please refer the full playlist of Selenium WebDriver. You will find different Selenium Tutorials videos over there. Here is the link: kzread.info/dash/bejne/fmyFzJiPk7Gtddo.html
Thank u sir...👍
It looks like for data provider we are again partially using the concept of reading Excel file and sending data from excel. If we know that approach is there any additional value/benefit of DataProvider?
Great job I was trying to add parameters in testng.xml file to my appium test, it working properly when im all tests, capabilities and android driver are written on same class But i found strange behaviour when im applying parameters for page object model ( baseSetup class contains capabilities, android driver and teardow - page class contains elements and steps - test class )
Hello Naveen, Why Xls_Reader decalred as static ? and then we are creating object of that new XLS_Reader
Nice video keep uploading
QQ: When we say that the parameters that we pass in the test method should be same as that in object repository-- it means that only the string parameters should remain same and we can have other datatypes in the method argument?
Hi Naveen Need your help to fetch the data using dataprovider for a scenario: there may be two sheets or two excels in which one sheet there is a customer id and in another sheet the customer name and other details(each 1st row of sheet1 has corresponding 1st row in 2nd sheet) I have to take 1st customer id(1st sheet) and proceed to next page to add other details(from 2nd sheet) and similarly go ahead adding further records.
Hi Naveen,is it possible to read selective records from the excel sheet when using data provider
To work with TestNG DataProvider for DD approach, is it necessary to use Apachi POI for doing Excel operations?
Hi Naveen, I have one doubt can we write more than two methods under a @dataprovider annotation or we should mention @dataprovider for each methods
Hello Naveen, Can you please share the link for the previous video where u created the excel and created all the Apache POI operations. Thanks in Advance.
can we use multiple data provider ..?? or i have to create multiple methods in utility for different sheet data using single data provider ..?
very nice explanation sir
Thank you so much Naveen!! I couldn't find any better videos than this. You are like an angel for us :) And Please let me know how to purchase. Its declining the transaction even after adding correct details
@naveenautomationlabs
3 жыл бұрын
Mail me at naveenanimation20@gmail.com
What video did you talk about the Excel sheet?
@naveen . Using data provider if I want TestNG result should show 1 in place of 4 then how to use. I don't want result shown as total test as 4. I want test results as 1. What to do
This video is very helpful, but i need to know how to use dropdown,doubleclick,and click option through this way could you share that type of videos its very helpful sir.
Do we have to maintain separate sheet for every test case
Hello, I haven't got the "get datafromExcel class file(utility file) with this video, where I get this file?
Thank you Naveen ,your video helps a lot I have small doubt in TestUtil class u where converting the excel sheet data into String but in real time will use for loop to fetch the data from Excel sheet in case of numeric data what we have to use if u use integer r double it will show data provider mismatch error
@ALISHA8632
4 жыл бұрын
Hey , did you get the solution for that?
@ankursharma786
4 жыл бұрын
Please user data DataFormatter via apache POI.
Can you please show us how to write test results(pass/fail) into XL sheet using Xls_reader when there are multiple xlsheets?
Hi naveen , how to use dataprovider for menubar concept?
Hi Naveen, How can i validate the input data is correct or not?
If I don't want the browser should close after every entry I want one time browser open and then do all the entry then quite how to do that ??
Hello sir, we can fetch values directly from excel file into our script. why dataProvider is needed in between ..
@naveenautomationlabs thank you for this video, this is great and helpful sir!... Can we also use this DataProvider for TestNG when writing back to the Excel or adding the new Status column using rowNum from Excel Utility class into the main Test annotations? Thank you @naveenautomationlabs
Hi Naveen, I have took the XLS creation code from the link you have given. After importing the poi jars, still it is showing so many errors. Can you please help how to resolve these errors. Most of the errors are related to cell type
Hi Naveen, i followed and created a program as you showed. But @Test annotation method is not executing. And I have a question, @Test method runs and calls @DataProvider annotation method or @DataProvider annotation method runs first. Your help will be more useful to me. Thank you.
Hi Naveen, Could you please explain how to write in excel. I am using Xls_Reader file and setcelldata( ) to write in excel, m not able to write.after execution when i m opening the file, a file gets corrupted.
Hi sir how can we use two dataprovider in same class for two test cases with parameters eg dataprovider1 for test1 and dataprovider2 for test2 which depends on test1 in same testclass.java
hi , after the method is it mandatory to close the browser ?? because i have many test cases after the test case which i use with data provider !!!!!
@Naveen AutomationLabs, I did the same you mentioned in video but still it is not writing data from excel file. If you can share any possible solution.
how can we save the excel sheet data in webpage or example if we want to enter values in contacts of FREECRM.plz let me know it will be great help.Thank you for all videos
Hi Naveen, Here in this example, as soon we are entering numerical data (zip-code), it enters as 94510.0 instead of 94510 which we have provided in Excel, How can we resolve this problem?
@naveenautomationlabs , could you please confirm if we can use String as Storing data in ArrayList ArrayList obj = new ArrayList();
Hi Naveen! Thanks a lot for this video! Can you please clear my one question.. I have uploaded the POI jar files but Xls_Reader function is not working.. any suggestion please? I am using the XSSFWorkbook.. and calling each rowNum and ColumnNum.. your techniques seems simple and effective.. (I have POI 3.17 version) List of POI jar files in Library: poi.3.17.jar poi.ooxml-3.17.jar poi-ooxml-schemas-3.27.jar (Am I missing any jar file?)
@priyankak126
5 жыл бұрын
Yes please add the jar files from the folders too
Hi naveen,is there any session on data driven using testng and POM?
Is it possible to “write” data in excel using @dataprovider?
Naveen sir, can u please tell us how to create our own framework to run our automated test scripts by using excel. It's not about data driven testing concept. Please help me out...
@NaveenAutomationLabs This is fine. But how can we call the dataprovider from one class to multiple classes?
Nice bro
Hi Naveen,Show how to open the script from selenium and how to debug the values of string
Hi Naveen. That class Xls_Reader which u created an object for that is not available in java packages neither in apache POI . Is that something you written on own?
@dhamotharan9132
Жыл бұрын
Did you got the answer?
Hi Naveen, running the same program gives me the below error. Can you please help me. FAILED CONFIGURATION: @AfterTest tearDown java.lang.NullPointerException
Hello All, can anyone please let me know how to import com.excel.utility.Xls_Reader I am unable to import and use. in eclipse it showing nothing to import for this. Any help would be much appreciated!
Can anyone tell me how do i get the sample testNG and data providers code explained by naveen on video?
hi naveen, In Xls_reader, excel code for date format was given as d/m/yy but how to change the code to dd/mm/yyyy format for picking date into my application. Please help me
If we use data provider ..can I run from testng XML file? Am facing issue.can you help me on this
Hi sir, My code everything is correct. But my test is getting skipped. I'm getting a warning msg as protocol handshake. Please suggest me on this. Thanks in advance.
Hi @Naveen AutomationLabs, I am using the same utility but facing one problem, suppose there is only one row in the excel(with valid data) and running the test case it is running 2 times. One is for valid data, 2nd one is for blank data(for 2nd row) while there is no data in the 2nd row. Could you please help on that?
Hi Naveen, Can you please explain on different set of data in the same sheet to execute multiple cases
How can I read multiple url through csv
Naveen I am unable to read the data from the excel, I am using same as your code but it is showing the errors. Is there something I might be missing? Please help....