You can use the move_to
function with the position specifier after
like so:
html() {
$("/html/body") {
$("./div[@id='parent']/div[@id='child1']") {
move_to("../div[@id='child2']", "after")
}
}
}
Here's a link to tritium playground: http://play.tritium.io/4078eded016a450e165d9f358cd547d3e47602d6