Skip to content

Commit e8fc9f9

Browse files
committed
Added test for parsing form value
1 parent b351ab4 commit e8fc9f9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

test_unstructured/partition/html/test_html_to_ontology_parsing.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,3 +594,18 @@ def test_text_is_wrapped_inside_layout_element():
594594
parsed_ontology = indent_html(remove_all_ids(ontology.to_html()))
595595

596596
assert parsed_ontology == expected_html
597+
598+
599+
def test_text_in_form_field_value():
600+
# language=HTML
601+
input_html = """
602+
<div class="Page">
603+
<input class="FormFieldValue" value="Random Input Value"/>
604+
</div>
605+
"""
606+
page = parse_html_to_ontology(input_html)
607+
608+
assert len(page.children) == 1
609+
form_field_value = page.children[0]
610+
print(page)
611+
assert form_field_value.text == "Random Input Value"

0 commit comments

Comments
 (0)