Skip to content

Commit

Permalink
patch for none deref on train-ticker crawl paths (#290)
Browse files Browse the repository at this point in the history
Co-authored-by: Saurabh Sinha <sinha108@gmail.com>
  • Loading branch information
rachelt44 and sinha108 committed Jul 27, 2022
1 parent a20b2d2 commit 9e42c85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tkltest/generate/ui/heuristic_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def process_table_element(self, form_field_dom, form_field_label):
# if no caption element exists, search for a header previous sibling of the table
else:
prev_element = table_dom.getprevious()
if prev_element.tag in ['h1', 'h2', 'h3']:
if prev_element and prev_element.tag in ['h1', 'h2', 'h3']:
table_label = prev_element.text

verb = 'select ' if form_field_type in ['checkbox', 'file', 'radio'] or form_field_dom.tag == 'select' else 'enter data in '
Expand Down

0 comments on commit 9e42c85

Please sign in to comment.