Shortened the xpath for getting max no pages, from absolute to relative.