How can we handle merged cell values in selenium code? | Selenium Forum
M
Posted on 21/10/2015
If a web page having a dynamic table & have some text fields then how can we pass values to the 2nd row of the table?

M
Replied on 21/10/2015

your question was very vague
but this blog post talk about this.

http://software-testing-tutorials-automation.blogspot.in/2014/06/how-to-handle-dynamic-web-table-in.html


M
Replied on 22/10/2015

Hi Ashish,

Thanks for your reply.

Please check the below details for issues i am facing:
http://bootsnipp.com/snippets/featured/dynamic-table-row-creation-and-deletion
in the above link there is a dynamic table to add new rows in the table by clicking on Add Row button. So, if a page having a table like above & also some more fields with it then in that case we have to merge the cell values in the excel.

Could you please let me know how can i iterate through the values passing from the excel sheets.

Also attached the excel sheet template.


M
Replied on 23/10/2015

so do you want to read the values from web table and write it in excel?


M
Replied on 23/10/2015

No, I will read the values from excel & will pass it to the web table.

Depending upon the Merged cell value it will click on Add Row button then will pass the row wise value.

e.g. in the attached sheet there are three rows merged. So the code will click on Add Row button 2 times & will pass the values in each row.


M
Replied on 27/10/2015

ashok, i'm not able to understand the problem you're having.


M
Replied on 28/10/2015

Hi Ashish,

I am implementing the TestNG data driven frame work in 1 of my project. I am trying to pass the data to the web page through excel sheets.

In 1 of web pages while adding a record i have to pass values from excel to a dynamic web table(e.g. in the link provided previously, there is a button to add rows to a table).

While reading data from excel i can able to insert the data row wise.So, in excel suppose I have merged 3 cell values, then is it possible for user to calculate the no. of merged cell?

I think if we can get count for the no. of merged cell values, then we can treat the 3 merged cell value as 1 value & can proceed.

Otherwise, if you have any code/framework to get the count for merged cell value from excel then please let me know.

Thanks,
Ashok


M
Replied on 29/10/2015

don't try to merge the cells in excel because xls_reader will not work. gives a null pointer error.