cancel
Showing results for 
Search instead for 
Did you mean: 

Find the Row Number from the HTML table

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
New Contributor

RE: Find the Row Number from the HTML table

Hi,



Can you please provide the solution for the above query.



Thanks in advance.



Regards,

Vinoth P S
Community Manager

RE: Find the Row Number from the HTML table


Hi Vinoth,


 


You can check the value of the RowIndex property.


 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Occasional Contributor

Re: Find the Row Number from the HTML table

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);
}
Community Hero

Re: Find the Row Number from the HTML table

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 Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors