code: function xpathToString(xpathArray) {
  	return xpathArray.reduce((str, elm) => {
  		if (elm.id) {
  			return `/${elm.str}[@id='${elm.id}']`;
  		} else {
  			return str + `/${elm.str}` + (elm.count > 0 ? `[${elm.count}]` : '');
  		}
  	}, '');
  }
docs: Robust is intended to allow xpaths to be robust to changes in the HTML structure of the page This means always use the id when present Non robust means always use the count (i.e. the exact position of the element) Ironically this is a bit of a misnomer because in very, very dynamic pages (e.g. where ids are generated on the fly) the non-ribust Xpaths will work whereas the robust ones will not work