diff --git a/src/babelHighlightUtil.ts b/src/babelHighlightUtil.ts index e0cf4f082..97266695c 100644 --- a/src/babelHighlightUtil.ts +++ b/src/babelHighlightUtil.ts @@ -83,7 +83,7 @@ export function locatorForSourcePosition(text: string, vars: { pages: string[], expressionNode = path.node.object.arguments[0]; - // *.locator(), *.getBy*(), call + // *.locator(), *.getBy*(), *.click(), *.fill(), *.type() call if (t.isCallExpression(path.node) && t.isMemberExpression(path.node.callee) && t.isIdentifier(path.node.callee.property) && diff --git a/src/debugHighlight.ts b/src/debugHighlight.ts index 5552b47c2..52ec94f5c 100644 --- a/src/debugHighlight.ts +++ b/src/debugHighlight.ts @@ -16,7 +16,7 @@ import { locatorForSourcePosition, pruneAstCaches } from './babelHighlightUtil'; import { debugSessionName } from './debugSessionName'; -import { locatorMethodRegex } from './methodNames'; +import { replaceActionWithLocator, locatorMethodRegex } from './methodNames'; import type { Location } from './reporter'; import { ReusedBrowser } from './reusedBrowser'; import * as vscodeTypes from './vscodeTypes'; @@ -148,6 +148,8 @@ async function locatorToHighlight(debugSessions: Map