in robot-server-plugin/src/main/resources/static/xpathEditor.js [234:257]
_formatAttributes(element) {
const attributes = element.attributes
if (attributes.length === 0) {
return ""
}
if (attributes.length === 1) {
return `[@${attributes[0].name}='${attributes[0].value}']`
}
let result = ""
for (let i = 0; i < attributes.length; i++) {
if (XpathEditor._goodAttributes.includes(attributes[i].name) && attributes[i].value.length > 1 && !/[']/.exec(attributes[i].value)) {
if (result.length === 0) {
result = `[@${attributes[i].name}='${attributes[i].value}'`
} else {
result = `${result} and @${attributes[i].name}='${attributes[i].value}'`
}
}
}
if (result.length > 0) {
result = `${result}]`
}
return result
}