We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e6cde3 commit 2926201Copy full SHA for 2926201
1 file changed
lib/locator.js
@@ -133,7 +133,7 @@ class Locator {
133
if (position === 0) {
134
throw new Error('0 is not valid element position. XPath expects first element to have index 1');
135
}
136
- const xpath = sprintf('%s[position()=%s]', this.toXPath(), position);
+ const xpath = sprintf('(%s)[position()=%s]', this.toXPath(), position);
137
return new Locator({ xpath });
138
139
0 commit comments