modified the generic xpath generator to handle the instance whereby xpaths click are not at similar levels in relation to the root