(self)
| 294 | Ensure that appending a string adds a text node. |
| 295 | """ |
| 296 | def test_append_string(self): |
| 297 | id_ = "element-append-tests" |
| 298 | div = web.page[f"#{id_}"] |
| 299 | len_children_before = len(div.children) |
| 300 | text_to_append = "a simple string" |
| 301 | div.append(text_to_append) |
| 302 | assert len(div.children) == len_children_before |
| 303 | assert div._dom_element.textContent.endswith(text_to_append) |
| 304 | |
| 305 | """ |
| 306 | Test that appending a string does not overwrite existing children. |