add csharp
This commit is contained in:
parent
2abcdbe67d
commit
5bf566180a
|
|
@ -573,6 +573,8 @@ export class CSharpLocatorFactory implements LocatorFactory {
|
|||
if (options.hasNotText !== undefined)
|
||||
return `Locator(${this.quote(body as string)}, new() { ${this.toHasNotText(options.hasNotText)} })`;
|
||||
return `Locator(${this.quote(body as string)})`;
|
||||
case 'frame-locator':
|
||||
return `FrameLocator(${this.quote(body as string)})`;
|
||||
case 'frame':
|
||||
return `ContentFrame`;
|
||||
case 'nth':
|
||||
|
|
|
|||
|
|
@ -593,4 +593,7 @@ it('parseLocator frames', async () => {
|
|||
expect.soft(parseLocator('python', `locator("iframe").content_frame.get_by_text("foo")`, '')).toBe(`iframe >> internal:control=enter-frame >> internal:text=\"foo\"i`);
|
||||
expect.soft(parseLocator('python', `frame_locator("iframe").get_by_text("foo")`, '')).toBe(`iframe >> internal:control=enter-frame >> internal:text=\"foo\"i`);
|
||||
expect.soft(parseLocator('python', `frame_locator("css=iframe").get_by_text("foo")`, '')).toBe(`css=iframe >> internal:control=enter-frame >> internal:text=\"foo\"i`);
|
||||
|
||||
expect.soft(parseLocator('csharp', `Locator("iframe").ContentFrame.GetByText("foo")`, '')).toBe(`iframe >> internal:control=enter-frame >> internal:text=\"foo\"i`);
|
||||
expect.soft(parseLocator('csharp', `FrameLocator("iframe").GetByText("foo")`, '')).toBe(`iframe >> internal:control=enter-frame >> internal:text=\"foo\"i`);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue