We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f69d8c commit 97e0f39Copy full SHA for 97e0f39
utils/table_util.py
@@ -34,7 +34,11 @@ def get_column_index(self, column_name: str) -> int:
34
:param column_name: Name of the column (e.g., 'NHS Number')
35
:return: 1-based column index or -1 if not found
36
"""
37
- header_row = (
+ # Try to find headers in <thead> first
38
+ header_row = self.table.locator("thead tr").first
39
+ if not header_row.locator("th").count():
40
+ # Fallback: look for header in <tbody> if <thead> is missing or empty
41
+ header_row = (
42
self.table.locator("tbody tr").filter(has=self.page.locator("th")).first
43
)
44
0 commit comments