Skip to content

Commit c5a8c4a

Browse files
DavertMikclaude
andcommitted
fix: pass context string (not locateFn) to findFields in WebDriver proceedSeeField
proceedSeeField was double-wrapping context through prepareLocateFn before passing to findFields, which already handles context internally. This caused "locator.replace is not a function" errors in 37 WebDriver tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a2c7465 commit c5a8c4a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/helper/WebDriver.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3076,8 +3076,7 @@ async function findFields(locator, context = null) {
30763076
}
30773077

30783078
async function proceedSeeField(assertType, field, value, context) {
3079-
const locateFn = prepareLocateFn.call(this, context)
3080-
const res = await findFields.call(this, field, locateFn)
3079+
const res = await findFields.call(this, field, context)
30813080
assertElementExists(res, field, 'Field')
30823081
const elem = usingFirstElement(res)
30833082
const elemId = getElementId(elem)

0 commit comments

Comments
 (0)