0

For single web element in that row i got index..for multiple column in a single row how to get the index:

IWebElement colelement = driver.FindElement(By.XPath("//div[@id='grdBooking']//table//tr/
th[contains(text(),'Case#')]"));
String colidx = colelement.GetAttribute("idx"); 
Console.WriteLine("Colelement index is =" + colidx);
1
  • Can you add your table structure?
    – STE
    Commented Jul 2, 2018 at 4:43

1 Answer 1

0

You can get the index of multiple column elements from a single row using For or For-each loop.

First get the column count by using .size() method and use for loop for getting all the index of all elements from the column.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.