-
Notifications
You must be signed in to change notification settings - Fork 270
Description
Version
1.58.0
Steps to reproduce
try (Playwright playwright = Playwright.create()) {
Browser browser = playwright.chromium().launch();
Page page = browser.newPage();
page.navigate("https://playwright.dev");
System.out.println(page.title());
System.out.println("Button = "+page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions()).count());
System.out.println("Link = "+page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions()).count());
Expected behavior
Fast and reliable end-to-end testing for modern web apps | Playwright
Button = 3
Link = 39 // I tried node.js version and it works as normal for link count.
Actual behavior
Fast and reliable end-to-end testing for modern web apps | Playwright
Button = 3
Link = 0 // in java (21), link count returns 0.
Additional context
if I choose one of the links with codegen and try to click it , it returns error after timeout and locator be coudnt found . I tried .all() methot and it returns an empty array [].
Shortly, in my computer, Arial.LINK locator works for node.js but not for java 21.
Environment
Win 11
Amd Ryzen 7
Chrome 145.0.7632.117
Java 21
Node.js v22.13.0
playwright 1.58.0