address feedback

This commit is contained in:
Simon Knott 2024-10-22 11:24:19 +02:00
parent 689eb7750d
commit 67606ee1d2
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -157,11 +157,6 @@ function innerAsLocators(factory: LocatorFactory, parsed: ParsedSelector, isFram
continue; continue;
} }
} }
if (part.name === 'internal:control' && (part.body as string) === 'enter-frame') {
tokens.push([factory.generateLocator(base, 'frame', '')]);
nextBase = 'frame-locator';
continue;
}
const nextPart = parts[index + 1]; const nextPart = parts[index + 1];
@ -208,11 +203,12 @@ function innerAsLocators(factory: LocatorFactory, parsed: ParsedSelector, isFram
factory.generateLocator(base, 'frame-locator', selectorPart), factory.generateLocator(base, 'frame-locator', selectorPart),
] ]
if (locatorPartWithEngine) if (locatorPartWithEngine) {
options.push( options.push(
factory.chainLocators([locatorPartWithEngine, contentFrame]), factory.chainLocators([locatorPartWithEngine, contentFrame]),
factory.generateLocator(base, 'frame-locator', stringifySelector({ parts: [part] }, /* forceEngineName */ true)), factory.generateLocator(base, 'frame-locator', stringifySelector({ parts: [part] }, /* forceEngineName */ true)),
) )
}
tokens.push(options); tokens.push(options);
nextBase = 'frame-locator'; nextBase = 'frame-locator';