The selector #test
in this line:
string x = html.Select("#test").After(frgt).Render();
is looking for an element with id="test"
. Your HTML only has an element with class test. Probably you want:
string x = html.Select(".test").After(frgt).Render();
.. to select the node with class test
.