Actually it does. I also checked with your code, it do append <p>some text</p>
to the modified_html
. The only possible issue I can think: there is no element with id = "test" in index.html. You may also want to save modified html to file so it will be easier for you to examine the output :
modified_html.Save(@"index_modified.html");