Skip to content

Commit a546d2e

Browse files
author
David Haeffner
committed
Excluding divs from innerText locatorBuilder strategy
1 parent e26c482 commit a546d2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/selenium-ide/src/content/locatorBuilders.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ LocatorBuilders.add('xpath:position', function(e, opt_contextNode) {
491491
})
492492

493493
LocatorBuilders.add('xpath:innerText', function(el) {
494-
if (el.innerText) {
494+
if (el.innerText && el.nodeName !== 'DIV') {
495495
const initialXpath = `//${el.nodeName.toLowerCase()}[contains(.,'${
496496
el.innerText
497497
}')]`

0 commit comments

Comments
 (0)