playwright-java icon indicating copy to clipboard operation
playwright-java copied to clipboard

[Feature]: ApiRequestContext: Add support for SSL Context

Open emeraldjava opened this issue 1 year ago • 3 comments

🚀 Feature Request

Allow the playwright api request make secure https requests. In our case that endpoint has https enabled and we need to provide the keystore/truststore credentials with the http request.

Example

In the config/setup of the playwright tests, the developer would provide paths the keystore/truststore. In the test code - the developer would config/inject the SSL Context details to the Transport interface implementation. The underlying calls would exchange the ssl details.

Motivation

Allows playwright api to be used to call https secured endpoints.

emeraldjava avatar Apr 15 '24 13:04 emeraldjava

Related https://github.com/microsoft/playwright/issues/1799

yury-s avatar Apr 16 '24 18:04 yury-s

You can manage the connection yourself in Java

page.route("**/*", route -> { FulfillOptions responseData = customJavaRequest(route.request()); route.fulfill(responseData); });

jasonparallel avatar Jul 19 '24 15:07 jasonparallel

@emeraldjava is this about TLS client certificates? Playwright supports them now (as files and as a direct content).

mxschmitt avatar Oct 02 '24 10:10 mxschmitt