microsoft / playwright-java

Java version of the Playwright testing and automation library
https://playwright.dev/java/
Apache License 2.0
1.16k stars 209 forks source link

[Bug]: The Paypal window is not available in headless mode #1675

Closed pawel747 closed 2 months ago

pawel747 commented 2 months ago

Version

1.45.0

Steps to reproduce

  1. In the e-commerce store, I choose the Pay pal payment method.
  2. An additional window pops up.
  3. I want to fill out the form fields in the additional Pay pal window

public Page switchToPayPalWindowAndPlaceOrder(String payPalEmail, String payPalPassword){ Page popup = page.waitForPopup(() -> { page.waitForTimeout(5000); getPlaceOrderButton().click(); page.waitForTimeout(5000); getPlaceOrderButton().click(); }); popup.getByPlaceholder("Email o numero di cellulare").fill(payPalEmail); popup.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Avanti")).click(); popup.getByPlaceholder("Password").fill(payPalPassword); popup.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Accedi")).click(); popup.getByTestId("submit-button-initial").click(); return popup; }

Expected behavior

It is possible to fill out the form fields in an additional Pay pal window

Actual behavior

It is possible to fill out the form fields in an additional Pay pal window only in browser mode. I would like to fill in the fields in headless mode as well.

Additional context

No response

Environment

Mac OS Sonoma 14.5 (23F79) CPU - Apple M1 Chromium Oracle OpenJDK 21.0.1 Maven 3.9.2

mxschmitt commented 2 months ago

This issue is not following the bug template. Please re-file and provide a self-contained reproduction, which we can run locally to reproduce your issue. Thanks for your understanding!

pawel747 commented 2 months ago

Please provide additional information, what specific data you need to reproduce the problem.