Replace lookup by xpath with lookup by id.
Improve tests.