* Find an element that does NOT have any of the provided attribute/value pairs. * @param {Object. } attributes * @returns {Locator}
(attributes)
| 428 | * @returns {Locator} |
| 429 | */ |
| 430 | withoutAttr(attributes) { |
| 431 | const operands = [] |
| 432 | for (const attr of Object.keys(attributes)) { |
| 433 | operands.push(`not(@${attr} = ${xpathLocator.literal(attributes[attr])})`) |
| 434 | } |
| 435 | const xpath = sprintf('%s[%s]', this.toXPath(), operands.join(' and ')) |
| 436 | return new Locator({ xpath }) |
| 437 | } |
| 438 | |
| 439 | /** |
| 440 | * Find an element that has no direct child matching the provided locator. |
no test coverage detected