Ask a Question

Find the Row Number from the HTML table

vinothps
New Contributor

Find the Row Number from the HTML table

Hi,



I have to find the Row number from the HTML table using the string value.



Eg: strName= "Vinoth"



Using "Vinoth", have to find out where its located in the HTML table.



Thanks,

Vinoth P S



4 REPLIES 4
vinothps
New Contributor

Hi,



Can you please provide the solution for the above query.



Thanks in advance.



Regards,

Vinoth P S
TanyaYatskovska
SmartBear Alumni (Retired)


Hi Vinoth,


 


You can check the value of the RowIndex property.


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



ishan_07
Occasional Contributor

Hello,
You can get the row id using javaScript. Following is the code for the same. You can verify it.

function  getId(element) {
    alert("row" + element.parentNode.parentNode.rowIndex + 
    " - column" + element.parentNode.cellIndex);
}

Hi,

 

a) This is TestComplete forum, thus Selenium code will not work;

b) It is pretty kind of you replying to the 6 (six) years old thread.

 

Regards,
  /Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
cancel
Showing results for 
Search instead for 
Did you mean: