Thank you Sir I have seen around 3-4 different video but I had not understood but after seeing your video I have successfully made excel dataprovider code in my project.Really helpful for me Thank You so much.God bless you.
Thanks a lot bro..u rockz..i searched whole day and getting fed up..and then i see ur 2-3 videos about read the data from excel and I have clear all the concept..keep sharing..
Mukesh otwani I am facing sone problem when I read the numeric value from excel..then in console error shows me..can't convert the numeric value to string value..plz suggest me what I will do..
Woow beautiful explanation bro 💥 I tried and got the output ❤️ thank you so much bro I was struggling alot with different codes finally I wrote my own to read the excel file its just because of you thank you so much ❤️
I have visited so many channel for this but I couldn't get any thing finally referred ur video and I got everything.. Thnx mukesh ur explained it very well.
You are truly blessed, your videos are helping a lot. Though i took training for Selenium, your tutorials are much more easier to understand and detail oriented. Wish you success and good luck.
Hi Mukesh , Your video is truly amazing... You have explained the whole concept in a very simple manner , this topic DDT now looks so much easy to do. once again sincere thanks to you ....
Hi Mukesh, Can't thank you enough :) I was so confused in reading and writing excel sheets but your videos are really awesome and easy to understand. Keep going!!
Hi, I am getting "Test ignored. Disconnected from the target VM, address: '127.0.0.1:54056', transport: 'socket'" issue, when I am trying to run above code on my IntelliJ
Thanks for this awesome explanation. I tried the same and it is running fine. The only problem I see in my code is, for all three inputs, the test shows pass. Its not failing for the wrong password input data.
Hi Mukesh Could you please make a video while executing the selenium scripts I wanted to get all the 6 rows data like(Invoice) from the excel sheet to be executed within a single browser
Hi Mukesh , I have a doubt here , please clarify In WordPressLoginExcel class we are using the ExcelDataConfig lib to access the inputdata xl file My question is why we are agian giving the xl file path in WordPressLogin class ? Thanks in advance
Quick question please. What if I want my loop to read my excel data from 2nd row? Bcuz I my column name is 'UserName', so I do not what my loop to contain that. PLEASE HELP. How can I tweak my for loop?
Hi Mukesh, What if i have more than 30 columns in the table and i have to pass through from dataprovider to test method, I struck here, any supported examples would help me to resolve this kinda of issues.
When we use dataProvider and try to do cross-browser testing in parallel from the TestNG XML file, it doesn't behave right. provide one data for each browser, when I remove parallel execution and let it run sequential, works fine. Any solution
Hi Vida Waran, it depends on how your driver instance is invoked. If driver is static then it wont run in parallel. In order to run @DataProvider in parallel, please make below changes in your test. 1- Make sure driver is not static 2- @DataProvider(name="dataprovidername",parallel=true) Hope it will help.
@@Mukeshotwani thank you very much, yes my browser was static when I changed it worked, I didn't give @DataProvider(name="dataprovidername",parallel=true) . once I changed the browser it worked
@@Mukeshotwani Also can you update video lecture for attaching file in selenium webdriver, I know its simple when we have input tag, just in case if we dont have input tag
I would suggest using *.csv instead of *.xls and especially *.xlsx. You can still use MS Excell to open *.csv files, but you can also use even simple notepad. Much more easier to access data file from anywhere, even from phone
hi mukesh suppose if i want to add only numbers means.. what should i do? ..suppose if there is phone number field in application means what should i do..where to change the code? .i am getting an error like cannot get a string value from numeric cell.
Hi Mukesh, i have 4 rows in my excel and in for loop, i started with i=1. but while running, the script is running 4 times with first data set as null,null. im not sure why the script is picking the first set as null,null Can you advice on this?
Hi Mukesh, Thanks for your amazing explanation on DataDriven Framework. I got closer to the concept and like rows can you please explain how to include column number in the loop as well? will help when I have more than 10 column values to be read from excel.
Thank you so much mukesh , here i want to read numeric value from same excel sheet and as well after execution of my script i want to write data in same excel sheet , could please give me some clues.
Hi Mukesh, I wish you can create a data driven frame work using POM design/framework. Thank you. We're excited on the part 3 of the Data Driven and I hope it is designed as POM Thank you so much
Sir , their is one problem. U had start the excel sheet from 1st row and if I want to use it from 2nd row by making int i=1.It shows null pointer exception.Please guide me
This data provider annotated method is not working while we have multi number of test annotated method / functions with priority. could you please give me a solution for that scenarios.
Hi Mukesh , I would like to know what are the different ways we can use to fetch the data by using @dataprovider & @Test in TestNG Framework. As we know for upload or download files with TestNG we can use Robot Class or Auto IT etc. Thanks
Hi Rupa, Let me explain this @DataProvider works like Data Source for our test so we can feed the data from excel, csv, database, json, xml or many more. In my example I have used Excel but you can use any data source but make sure we pass the data in 2D array.
Hi Mukesh, Need your help to read data from two sheets, like from first sheet take some data and proceed to further page and take some data from second sheet(first sheet and 2nd sheet data has dependency). How shall i implement this using Dataprovider
Hi Reshma DataProvider takes same set of data and then pass the test. If you have such dynamic scenario then better to get direct values from excel and use in test cases.
for those who worked in advance selenuim project, What is the difference between storing test dsta in yml file vs excel, when do we need to store data in sql DB?
Hi Mukesh, your videos are good and useful. I am gaining good knowledge with that. Thanks a lot. Could you please post some videos on Keyword driven framework in Selenium
Hi Mukesh, I have a small doubt, whenever in the for loop I change i=1 for reading through the excel, it passes null as username and password. Rest of the code I'm using the same as above. Can you please help in this regards.
Hi Rashmi, please share the screenshot and if possible try to debug your code. If code as red line then it could be either compile time issues or some checked exceptions while using some statement.
Hello Mukesh. I have followed your both lectures on Data driven framework excel based. And done the same as shown in the video. But while executing I'm getting this error. Can you help me with this? SKIPPED: Login java.lang.RuntimeException: java.lang.IllegalStateException: Cannot get a STRING value from a NUMERIC cell
Hi Harshith Reason is you are trying to read numreric value. Kindly follow below post to fix issue. learn-automation.com/read-numeric-data-excel-using-apache-poi-selenium-webdriver/
Hi Mukesh, you have explained all the things very nicely and its really helpful in understanding the flow. One doubt is don't we have any main method when we are running our script using TestNG?
Hi Shweta I am glad you like it. You can use main method of Java or @Test of Testng framework. In above video I have used @DataProvider of TestNG framework. You can get full info about TestNG from below video. ruclips.net/video/OTtFSnZY4f8/видео.html
Sir what to do when we put invalid data then alert window come so that time user not found massage will not come ? How to write asserttrue condition? Showing error org.openqa.selenium.Unhandled AlertException
Hi Mukesh, Thanks for this video its very simple and easy to understand but it works only for string values but when it comes to int or any other data type its failing. Do you have any video that covers at least integer also
Hi Mukesh, Huge thanks for uploading this video. However, I am getting "Cannot get a STRING value from a NUMERIC cell" error message when i try to execute the script. Can you please help me?
Hello mukesh , I have done as you made but I am getting "can not get a string value from numeric value" , Can you please explain what is I am doing wrong?
Hi Mukesh i have a question that, while execution can i run the code without closing the sheet from where i am providing the data or do i need to close the sheet every time i run the script??
yes, you can, because in current code, you are just performing the read operation... you will need to close the data sheet, when you will be performing the write operation
Hi...Mukesh. You have made very nice tutorial. Thanks a lot. As you mentioned, there will be part 3 of DDT framework, I am not able to find it. Would you please share the link.
@@Mukeshotwani cannot agree more. I am keen to join to learn java, classes, adv reporting and creating test cases, suites ..i received email that you are starting on Oct 19..I am waiting confirmation mate
Mukesh, I am getting data provider mismatch. I followed the part 1 video and that works for me. I copied the part 1 script and followed each and every step you mentioned in your in this video but it is throwing me this error. Can you please help me?
Question- You have a assert.asserttrue.. which logs failed message when the assertion fails. Then you have a Sys.out.prntln for pass scenario. Now if a scenario fails, it should log the failed message and then execute the next line which is sys.out.prntln thus printing successful log. Is this assumption right?
Thanks a lot Mukesh, really it very useful video for beginners ... I really appreciate to keep posting this kind of video....I hope soon we will get part 3. can you tell me what is annotation ? how to use annotation and where ?
+Saravana Sakthi Hi Saravana yes will upload soon. Annotation in java is just the seperate class which perform the perticular task. We have different annotations based on requirement. TestNg and Java itself have plenty of annotation. Can you please specify the annotation which you want to know.
Hey Deepak, yes we can do that.. Like manual testing we have multiple test for positive and negative. Likewise you have to create multiple scripts in Selenium as well.
Hi Mukesh, Thanks for the wonderful session on data driven concept. Very helpful to me. Can you please help me to handle multiple sheet data. Regards, Sayed
Hi Mukesh, Thank you so much for your effort made to teach Selenium to the folks like me.. I am trying to find Part 3 of this DDF, that you mentioned at the end of the Part 2 video.. But i am unable to find. Pls assist me to find..
Again, this is super awesome video. Explained in great detail. I tried it on the website that I am trying to automate and it worked really well. I, however stumbled onto issues with the Testng annotations. My script does the same thing, test login first. However, there was another script that I wanted to execute once the login is successful. However, when I run that script, it started failing (my login script previously has the annotation @BeforeMethod which we changed to @Test(dataProvider = "logindata") Any suggestions here.
This may be too much of an ask to have you help us solve our problems. But your videos are good detailed and are turning new comers into good automation test engineers. I am completely glued to these tutorials.
Hi Pankaj, @Test method will run multiple times based on number of rows so make sure @BefireMethod has only browser related details. @Test should have actual test.
Hi Mukesh, Completely impressed with the way how you are teaching. Suppose if i want to use the excel data in multiple classes present in different packages. Will you please let me know the generic code, how can i do that ?
hii mukesh, from these videos i understand about how to get values from xcel sheet its great. one dout if we have more no of columns like 50 then how can we write the column related code without using hardcode???????
yes i tried but its not working just skipping and getting a failure,here is the code i tried package pack01; //import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.AfterMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; import lib.xcel02; public class class01 { WebDriver driver;
@Test(dataProvider="fb") public void loginToFb(String username,String password) { driver=new FirefoxDriver(); driver.manage().window().maximize(); driver.get("facebook.com/"); driver.findElement(By.id("email")).sendKeys(username); driver.findElement(By.id("pass")).sendKeys(password); driver.findElement(By.id("u_0_2")).click(); driver.close(); } @DataProvider(name="fb") public Object[][] passData() { xcel02 xcel=new xcel02("C:\\projects\ ew_project\\src\\lib\\TestData\\InputData.xlsx"); int rows=xcel.getRowCount(0); int columns = xcel.getColumnCount(0); System.out.println(columns); Object[][] data=new Object[rows][columns]; for(int i=0;i
Hi Mukesh, First of all, thanks a lot. Your videos are really very helpful to understand Selenium. I have covered Data Driven Framework, both parts. Now I am looking for Keyword Driven Framework, but not able to find it. Could you plz share the link.
Thank you Sir I have seen around 3-4 different video but I had not understood but after seeing your video I have successfully made excel dataprovider code in my project.Really helpful for me Thank You so much.God bless you.
I have to say Thank you. I successfully learnt Data driven Framework because of you. Thank you so much.
Welcome Mounika I am glad my video helped you. Keep learning. Let me know if any help from my side.
Thanks a lot bro..u rockz..i searched whole day and getting fed up..and then i see ur 2-3 videos about read the data from excel and I have clear all the concept..keep sharing..
Cheers Prateek :) Keep learning new concepts.
Join FB Group too.
facebook.com/groups/256655817858291/
Mukesh otwani I am facing sone problem when I read the numeric value from excel..then in console error shows me..can't convert the numeric value to string value..plz suggest me what I will do..
Woow beautiful explanation bro 💥 I tried and got the output ❤️ thank you so much bro I was struggling alot with different codes finally I wrote my own to read the excel file its just because of you thank you so much ❤️
Awesome Prakash 🤗 Cheers
I have visited so many channel for this but I couldn't get any thing finally referred ur video and I got everything.. Thnx mukesh ur explained it very well.
Thanks Mate :) good to know you finally understand DDF. Keep learning.
Hi Mukesh, I always refer your videos for selenium. Thanks for uploading such videos.Thanks a lot.
So nice of you Mili. Thank you and let me know know if you need any help from my end.
You are truly blessed, your videos are helping a lot. Though i took training for Selenium, your tutorials are much more easier to understand and detail oriented. Wish you success and good luck.
+Sowmya Poddaturi Thanks Sowmya thanks a ton. Please let me know if any help required from my side.
Hi Mukesh , Your video is truly amazing... You have explained the whole concept in a very simple manner , this topic DDT now looks so much easy to do. once again sincere thanks to you ....
Thanks a ton Gaurav 🙏 Keep learning and let me know if any help required from my side.
your videos are helping me to brushup my coding and debugging skills
Thanks for Uploading and explaining the POM in easily understandable way. Looking for more Information in Future...
All the Best
+AKBAR HUSSAIN Thanks Akbar :) Many videos in queue will upload soon.,
Hi Mukesh, Can't thank you enough :) I was so confused in reading and writing excel sheets but your videos are really awesome and easy to understand. Keep going!!
Thanks Priyanka :) keep learning and let me know if any help from my side.
Thanks Mukesh, searching for this video since long time.
You are most welcome Juned.
Good Mukesh,
Keep it up, You are growing our scripting knowledge. Now I am using this for my project and working good...
Thanks Niwrutti I am glad it is helping.
Finally I have found one video with clear description what I was looking for. Thanks a lot Mukhesh. Looking forward to learn more from you.
+israt khan Thanks Israt will upload part 3 soon which will update the status in excel :)
Wonderfully explain....you have unique skill to make things easier for other...
+nikunj bambhroliya HI Nikunj thanks a ton :)
Hi,
I am getting "Test ignored. Disconnected from the target VM, address: '127.0.0.1:54056', transport: 'socket'" issue, when I am trying to run above code on my IntelliJ
@Mukeshotwani
is there any place you have mentioned all the code in one placed which can copied or collected?
Thanks a lot for explanation of DDF approach. Waiting for Part 3 .. :)
+Alexander Svyatenko Hi Alex will upload soon :) thank you
Thanks a lot. Finally understood data driven framework and could do it as well.
Thanks Shwetali and I am happy to hear from you.
Thank you mukesh waiting for part 3
Thank you Mukesh, waiting for part 3
will try to make new videos soon.
you are really great mukesh we help to others
Thanks Manas
Nice explanation to understand...thanks a lot.
Excellent Work. It helps a lot for Beginners. please upload Part 3 of DDF.
+M V REDDY yes will upload soon
+Mukesh otwani plz upload DDT Part-3 soon Sir ,i am waiting for that video from last 3 months Sir ,So plz upload ASAP Sir
Hi M V Reddy
Once I will get time I will upload part 3 and will let u know
Thank you so much Mukesh for this video tutorial. It's really very helpful...:-)
Thanks Anurag :)
Good Bro ,
Nice Explanation..Thanks for Sharing the Knowledge.
Thanks I am glad you liked it. Keep visiting.
Hi Mukesh, its really good and you have explained in details. Thanks
waiting for part 3 :)
+Raghu Hoskote Hi Raghu will upload in May
+Mukesh otwani no worries thankQ :)
+Raghu Hoskote :)
Hi bro thanq so much for uploading these videos and nice explanation i think this much is enough for beginners also.
Most welcome Seshasai :)
Thanks for this awesome explanation. I tried the same and it is running fine. The only problem I see in my code is, for all three inputs, the test shows pass. Its not failing for the wrong password input data.
Hi Mukesh
Could you please make a video while executing the selenium scripts I wanted to get all the 6 rows data like(Invoice) from the excel sheet to be executed within a single browser
Hi Mukesh if we want to loop through so many coloums then, do we need to manually update it.??
Hi Deepti no you can also get all columns using getPhysicalNumberOfCells and then run for loop.
@Mukesh otwani Can u help us in looping columns too
Hi Mukesh ,
I have a doubt here , please clarify
In WordPressLoginExcel class we are using the ExcelDataConfig lib to access the inputdata xl file
My question is why we are agian giving the xl file path in WordPressLogin class ?
Thanks in advance
Quick question please. What if I want my loop to read my excel data from 2nd row? Bcuz I my column name is 'UserName', so I do not what my loop to contain that. PLEASE HELP. How can I tweak my for loop?
Great Videos!! Thanks for doing this! Please do DDF part3!
Hi Mukesh,
What if i have more than 30 columns in the table and i have to pass through from dataprovider to test method, I struck here, any supported examples would help me to resolve this kinda of issues.
When we use dataProvider and try to do cross-browser testing in parallel from the TestNG XML file, it doesn't behave right. provide one data for each browser, when I remove parallel execution and let it run sequential, works fine. Any solution
Hi Vida Waran, it depends on how your driver instance is invoked. If driver is static then it wont run in parallel.
In order to run @DataProvider in parallel, please make below changes in your test.
1- Make sure driver is not static
2- @DataProvider(name="dataprovidername",parallel=true)
Hope it will help.
@@Mukeshotwani thank you very much, yes my browser was static when I changed it worked, I didn't give @DataProvider(name="dataprovidername",parallel=true)
. once I changed the browser it worked
@@Mukeshotwani Also can you update video lecture for attaching file in selenium webdriver, I know its simple when we have input tag, just in case if we dont have input tag
@@Mukeshotwani Thank you very much for the answer it worked
Thanks a lot Mukesh - do we have a video for reading data in more than 2 excel columns? (like by using Hashmap/set collection etc.)
Excellent Work. It helps a lot for Beginners. please upload Part 3 of DDF. Please try to upload POM and Page Navigation if possible
+Manjunath B.N Thanks Manjunath I will upload by this weekend.. :)
Hi Mukesh, I could not find it in your blog, can you please send me the link if possible?
What if hv more than two columns and we need to same two dimensional array.
hi mukesh ...i could not find 3rd part of data driven framework with reporting that you were talking about in part 2(this).
Hi Sumit You can try part 3 as part of assignment.
Hello Mukesh sir its very useful video for me and than you
Thank you Punam keep learning 😊
I would suggest using *.csv instead of *.xls and especially *.xlsx.
You can still use MS Excell to open *.csv files, but you can also use even simple notepad.
Much more easier to access data file from anywhere, even from phone
These videos are really good. I could not find part 3 of Data Driven framework.
Very nice Tutorial.. Thank you Mukesh..
+Shilpa Thanks Shilpa
hi mukesh
suppose if i want to add only numbers means.. what should i do? ..suppose if there is phone number field in application means what should i do..where to change the code? .i am getting an error like cannot get a string value from numeric cell.
Simply Superb.
+GAJANAN PATIL I m glad it helped u
Hi Mukesh, i have 4 rows in my excel and in for loop, i started with i=1. but while running, the script is running 4 times with first data set as null,null. im not sure why the script is picking the first set as null,null
Can you advice on this?
Great video sir, it helped me lot. Please teach us how to mail the testng report to the desired recepients. Thanks again
Here is the detailed article ruclips.net/video/qGq9K85mGyA/видео.html
Hi Mukesh, Thanks for your amazing explanation on DataDriven Framework. I got closer to the concept and like rows can you please explain how to include column number in the loop as well? will help when I have more than 10 column values to be read from excel.
Hi Raja, in order to read column as well you need to use another loop as well.
Thank you so much mukesh , here i want to read numeric value from same excel sheet and as well after execution of my script i want to write data in same excel sheet , could please give me some clues.
Hi Mukesh, I wish you can create a data driven frame work using POM design/framework.
Thank you. We're excited on the part 3 of the Data Driven and I hope it is designed as POM
Thank you so much
Hey Aldrin Part 3 will be Data driven with Page Object model
Hi Mukesh,
Before practicing DDT part1 and part2 do we need to do any set up in my project.if yes pls share that link for set up in my project
Hi Mukesh, where is the part 3 ? unable to find it.
Can I try storing all the values of id,xpath,classname,in excel file and then try to call them in through data driven concept.
Sir , their is one problem. U had start the excel sheet from 1st row and if I want to use it from 2nd row by making int i=1.It shows null pointer exception.Please guide me
Hi Suraj, make sure you add NA or change your utility method which can handle null values.
This data provider annotated method is not working while we have multi number of test annotated method / functions with priority. could you please give me a solution for that scenarios.
Hi Mukesh, how can dataProvider will handle if we need 5 values from excel for one test? How can we handle that? Thanks in advance
Hi Mukesh ,
I would like to know what are the different ways we can use to fetch the data by using @dataprovider & @Test in TestNG Framework.
As we know for upload or download files with TestNG we can use Robot Class or Auto IT etc. Thanks
Hi Rupa,
Let me explain this
@DataProvider works like Data Source for our test so we can feed the data from excel, csv, database, json, xml or many more.
In my example I have used Excel but you can use any data source but make sure we pass the data in 2D array.
thanks Mukesh for this helpful tutorial, plz upload part 3 of Data Driven Framework tutorial
+Sumit Kumar Hi Sumit coming soon.
Hi Mukesh,
Need your help to read data from two sheets, like from first sheet take some data and proceed to further page and take some data from second sheet(first sheet and 2nd sheet data has dependency).
How shall i implement this using Dataprovider
Hi Reshma DataProvider takes same set of data and then pass the test.
If you have such dynamic scenario then better to get direct values from excel and use in test cases.
Hi Mukesh,
Object[][] data = new Object[rows[[2]; Here columns is hard coded. Can you reply how to write optimized code for that?
Thanks mukesh... Video is very helpful for us... Could you please upload Data Driven Framework Excel Based Part 3 video.
i am getting this below error while running program #Mukeshotwani
Cannot get a STRING value from a NUMERIC cell
Please use getNumericCellVvalue method learn-automation.com/read-numeric-data-excel-using-apache-poi-selenium-webdriver/
for those who worked in advance selenuim project, What is the difference between storing test dsta in yml file vs excel, when do we need to store data in sql DB?
Hi Mukesh, your videos are good and useful. I am gaining good knowledge with that. Thanks a lot. Could you please post some videos on Keyword driven framework in Selenium
Hello Sir,
Can you please give the link for video -Data Driven framework part 3. I'm unable to find it.
Hi Mukesh,
To create an array of object, shouldn't the datatype be class. Not getting how Object[][] is the return type of the method.
Hi, very nice and elaborate video. But how do you get the folder for default reporting?
Hi Pratilipi,
You can refresh the page. It comes by default.
You can check my TestNG video on this
ruclips.net/video/OTtFSnZY4f8/видео.html
Hi Mukesh,
I have a small doubt, whenever in the for loop I change i=1 for reading through the excel, it passes null as username and password. Rest of the code I'm using the same as above. Can you please help in this regards.
HI Pankaj,
Start loop with 0
Hi, My ExcelConfig file is not imported into the project, It's showing red although the file is present in the structure. Could you please help?
Hi Rashmi, please share the screenshot and if possible try to debug your code. If code as red line then it could be either compile time issues or some checked exceptions while using some statement.
Hello Mukesh.
I have followed your both lectures on Data driven framework excel based. And done the same as shown in the video.
But while executing I'm getting this error. Can you help me with this?
SKIPPED: Login
java.lang.RuntimeException: java.lang.IllegalStateException: Cannot get a STRING value from a NUMERIC cell
Hi Harshith
Reason is you are trying to read numreric value. Kindly follow below post to fix issue.
learn-automation.com/read-numeric-data-excel-using-apache-poi-selenium-webdriver/
Thank you so much.. excellent video , I have implemented and work nicely...
Cheers
Hi Mukesh, you have explained all the things very nicely and its really helpful in understanding the flow. One doubt is don't we have any main method when we are running our script using TestNG?
Hi Shweta I am glad you like it. You can use main method of Java or @Test of Testng framework. In above video I have used @DataProvider of TestNG framework.
You can get full info about TestNG from below video.
ruclips.net/video/OTtFSnZY4f8/видео.html
Sir what to do when we put invalid data then alert window come so that time user not found massage will not come ? How to write asserttrue condition?
Showing error org.openqa.selenium.Unhandled AlertException
Thank you so much for this excellent tutorial...
Thanks Sadhanana :) Happy weekend.
Hi Mukesh, Thanks for this video its very simple and easy to understand but it works only for string values but when it comes to int or any other data type its failing. Do you have any video that covers at least integer also
Hi Mukesh,
Huge thanks for uploading this video. However, I am getting "Cannot get a STRING value from a NUMERIC cell" error message when i try to execute the script. Can you please help me?
Hi Yojana I have explained the same in below post
learn-automation.com/read-numeric-data-excel-using-apache-poi-selenium-webdriver/
Hi Mukesh/All,
Good day!
How can i directly get the 2nd row? i tried to make the for(int i=1;i
hi Aldrin, did you get the solution for the above mentioned issue. i am also facing the same issue please do help me out if u have got the solution ?
What do you mean you are getting first row as null values?
Instead of hard coding column number, can we just count the column and iterate according to the column index no?
Hi Swapna, you can use sh.getRow(0).getPhysicalNumberOfCells();
@@Mukeshotwani can you please explain where should I use the function mentioned y you in your comment
Hello mukesh , I have done as you made but I am getting "can not get a string value from numeric value" , Can you please explain what is I am doing wrong?
Hi Mukesh i have a question that, while execution can i run the code without closing the sheet from where i am providing the data or do i need to close the sheet every time i run the script??
yes, you can, because in current code, you are just performing the read operation... you will need to close the data sheet, when you will be performing the write operation
Hi Mukesh,
Thanks for the clear explanation about DD framework. Can you please explain how to use column count in for loop without hard coding.
Hi Dwaraka you can use getPhysicalNumberOfCells(); for column count
Hi...Mukesh. You have made very nice tutorial. Thanks a lot. As you mentioned, there will be part 3 of DDT framework, I am not able to find it. Would you please share the link.
+Abhishek Agrawal Hi Abhishek I still have not updated will upload soon.
Thank you Mukesh ji, I see only videos in your website, how to get this code to analyze in your website.
Hi Mate,
Code I have to modify. I would you to write from scratch which will add more value.
@@Mukeshotwani cannot agree more. I am keen to join to learn java, classes, adv reporting and creating test cases, suites ..i received email that you are starting on Oct 19..I am waiting confirmation mate
Hi Anand, I sent email regarding same, please check. Date and Time is confirmed.
hi sir,
i have an small doubt iwill take password numeric values in excel sheet.it doesn't take the password. plese tell the problem.
Mukesh, I am getting data provider mismatch. I followed the part 1 video and that works for me. I copied the part 1 script and followed each and every step you mentioned in your in this video but it is throwing me this error. Can you please help me?
Question- You have a assert.asserttrue.. which logs failed message when the assertion fails. Then you have a Sys.out.prntln for pass scenario. Now if a scenario fails, it should log the failed message and then execute the next line which is sys.out.prntln thus printing successful log. Is this assumption right?
Hi Sourav correct.
can you tell how to read write locators from selenium java without looping?
Hi Areeba, you can use Page Object Model which is common/ standard for writing automated test cases.
Hi Areeba here is the link of Page Object Model ruclips.net/video/w_iPCT1ETO4/видео.html
Hi Mukesh, can you let us know how to write to the Excel file using the case you use here? Thank you.
+Hugo van den Berg Hi Hugo thanks yes planning for this sunday will upload and let you know
Thanks a lot Mukesh, really it very useful video for beginners ... I really appreciate to keep posting this kind of video....I hope soon we will get part 3.
can you tell me what is annotation ? how to use annotation and where ?
+Saravana Sakthi Hi Saravana yes will upload soon. Annotation in java is just the seperate class which perform the perticular task. We have different annotations based on requirement. TestNg and Java itself have plenty of annotation. Can you please specify the annotation which you want to know.
I am new to selenium. Want to know how we can implement positive and negative scenario test cases.please, make one video on that.thanks.
Hey Deepak, yes we can do that.. Like manual testing we have multiple test for positive and negative. Likewise you have to create multiple scripts in Selenium as well.
Thank you Mukesh.
Hi Mukesh,
Thanks for the wonderful session on data driven concept. Very helpful to me. Can you please help me to handle multiple sheet data.
Regards,
Sayed
Hey Sayed, you can for loop for handling multiple sheet and then iterate row and column.
Hi Mukesh, Thank you so much for your effort made to teach Selenium to the folks like me..
I am trying to find Part 3 of this DDF, that you mentioned at the end of the Part 2 video.. But i am unable to find. Pls assist me to find..
Hi Priya, I will try to publish soon.
Hi Mukesh,
How can i directly get the 2nd row? i'm getting the 2nd row but i'm still getting the 1st row with "null" values.
Hey Aswath you can give row and column count directly.
Hi Aswath did you resolve problem ? because now i have same case ?
Again, this is super awesome video. Explained in great detail. I tried it on the website that I am trying to automate and it worked really well. I, however stumbled onto issues with the Testng annotations. My script does the same thing, test login first. However, there was another script that I wanted to execute once the login is successful. However, when I run that script, it started failing (my login script previously has the annotation @BeforeMethod which we changed to @Test(dataProvider = "logindata")
Any suggestions here.
This may be too much of an ask to have you help us solve our problems. But your videos are good detailed and are turning new comers into good automation test engineers.
I am completely glued to these tutorials.
Hi Pankaj, @Test method will run multiple times based on number of rows so make sure @BefireMethod has only browser related details. @Test should have actual test.
Hi Mukesh,
Completely impressed with the way how you are teaching.
Suppose if i want to use the excel data in multiple classes present in different packages.
Will you please let me know the generic code, how can i do that ?
Hi Mukesh,can you add TestNG framework with read data from excel??
hii mukesh, from these videos i understand about how to get values from xcel sheet its great. one dout if we have more no of columns like 50 then how can we write the column related code without using hardcode???????
Hi Keerthi, yes you can run a for loop as well for columns..
yes i tried but its not working just skipping and getting a failure,here is the code i tried
package pack01;
//import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import lib.xcel02;
public class class01 {
WebDriver driver;
@Test(dataProvider="fb")
public void loginToFb(String username,String password)
{
driver=new FirefoxDriver();
driver.manage().window().maximize();
driver.get("facebook.com/");
driver.findElement(By.id("email")).sendKeys(username);
driver.findElement(By.id("pass")).sendKeys(password);
driver.findElement(By.id("u_0_2")).click();
driver.close();
}
@DataProvider(name="fb")
public Object[][] passData()
{
xcel02 xcel=new xcel02("C:\\projects\
ew_project\\src\\lib\\TestData\\InputData.xlsx");
int rows=xcel.getRowCount(0);
int columns = xcel.getColumnCount(0);
System.out.println(columns);
Object[][] data=new Object[rows][columns];
for(int i=0;i
Hi Mukesh, First of all, thanks a lot. Your videos are really very helpful to understand Selenium. I have covered Data Driven Framework, both parts. Now I am looking for Keyword Driven Framework, but not able to find it. Could you plz share the link.
Hi Swati, for Keyword driven framework I will upload soon.