I am trying to iterate through a list of columns for a table header row, and need to print out the text of the element (getText()
). How can this be done when there are many columns (td
) for the specific table header row? Below is the XPATH and a screenshot showing the columns (count of 54 columns):
XPATH expresssion for table header row: //*[@id="accuracyTableWrapper"]/table/thead/tr
XPATH expresssion for table column: //*[@id="accuracyTableWrapper"]/table/thead/tr/td
(where there are 54 instances of this)
How can this be done efficiently in order to properly print out the text for each td
? Please let me know for any suggestions.