Context:
- Playwright Version: 1.27
- Operating System: Windows
- .NET version: .NET 6
- Browser: Chromium & Firefox
- Extra: -
Code Snippet
The new selectors in version 1.27.0 of codegen creates NUnit code in C# that does not compile.
The generated code to click a link looks like this:
await Page.GetByRole("link", new() { Name = "https://www.insel.ch" }).ClickAsync();
To compile the code, it should look like this:
await Page.GetByRole(AriaRole.Link, new() { NameString = "https://www.insel.ch" }).ClickAsync();
There is “link” instead of AriaRole.Link and “Name” for the property NameString of the PageGetByRoleOptions object.
In codegen version 1.26.0 it created this code that compiled:
await Page.Locator("text=https://www.insel.ch").ClickAsync();
Describe the bug
It looks for me as if the change for the selectors is only partially done in V1.27 and a few cases are missing. You can find the whole generated code in the attached files. (OldVersion.txt is generated with version 1.26 of codegen, CurrentVersion.txt is the output of 1.27 and the manual fixes to make the code compile.)
OldVersion.txt
CurrentVersion.txt
Context:
Code Snippet
The new selectors in version 1.27.0 of codegen creates NUnit code in C# that does not compile.
The generated code to click a link looks like this:
To compile the code, it should look like this:
There is “link” instead of AriaRole.Link and “Name” for the property NameString of the PageGetByRoleOptions object.
In codegen version 1.26.0 it created this code that compiled:
Describe the bug
It looks for me as if the change for the selectors is only partially done in V1.27 and a few cases are missing. You can find the whole generated code in the attached files. (OldVersion.txt is generated with version 1.26 of codegen, CurrentVersion.txt is the output of 1.27 and the manual fixes to make the code compile.)
OldVersion.txt
CurrentVersion.txt