HI Mukta Thanks for taking time to comment here. You can find the complete code at below URL on my blog - automationtalks.com/2017/10/27/data-driven-framework-selenium-webdriver/
where did you create a mapdata object ? it is not present anywhere in this program ? you created datamap for reading excel value and storing thats fine. But while accessing them in the test method how suddenly you are using another map object ?
Yes, It can. You need to make sure that when you define hashmap, it is of that respective type. For exmaple, for storing an int array in hashmap: HashMap h = new HashMap();
You did not explain how obj[i][0]=datamap is working here. Asking this question because map will never have 2 values with same key then how is return obj which is a single column array able to return all the key value pairs
Hey, here each cell in the 1-dimensional array stores a different map. Another thing here is that..he did not need to create a 2-d array. 1-d array was enough.
Excellent video prakash. Thanks a lot for explaining the concept so clear. Appreciate your effort.
Great approach. It solved my problem.one question ..instead od object[rowcount][1], can we use list and return it from dataprovidet
why there are dislike to this Video.......Thanks for video and Appreciate your efforts.
Excellent video.Thank you!
Very good video, Prakash! Great work! Can you please share your GIT repo code base URL? Thank you for explaining so clearly!
HI Mukta
Thanks for taking time to comment here.
You can find the complete code at below URL on my blog -
automationtalks.com/2017/10/27/data-driven-framework-selenium-webdriver/
Thanks sir...
Hi when I am calling mapreferance variable dot get(key) getting null
Brother can you kindly update the code on writing into excel file using hashmap. It will be really helpful
where did you create a mapdata object ? it is not present anywhere in this program ? you created datamap for reading excel value and storing thats fine. But while accessing them in the test method how suddenly you are using another map object ?
Hi prakash, what is the reason behind creating map object inside for loop... Is it by mistake or intentionally?.
It's because to get new key and values. Map creation outside for loop will give you only the latest key and value pair
Hello,
If my Test method is in different class.
How will the test class communicate with dataProvider.
Please let me know.
Thanks
Make your dataprovider static.
Hi bro ,
Can a Map datamap can hold array (obj) reference ??
Yes, It can. You need to make sure that when you define hashmap, it is of that respective type.
For exmaple, for storing an int array in hashmap:
HashMap h = new HashMap();
Thnaks bro
How to Pass number of test data into application used on excel data
How to pass into application use this code?
How can we pass excel data in sendkeys here, please explain
Read excel data using Apache POI in to any collection framework, then retrive the data from it and pass it to sendkeys.
You have not explained the logic behind using object[row][1]. Really confusing
You did not explain how obj[i][0]=datamap is working here. Asking this question because map will never have 2 values with same key then how is return obj which is a single column array able to return all the key value pairs
Even I had Same Quesiton and another thing is how data[0][i] is working I am not able to understand this also
Hey, here each cell in the 1-dimensional array stores a different map.
Another thing here is that..he did not need to create a 2-d array. 1-d array was enough.
Very much confusing