From c52444d232bb70059aa36fd12a671b1d5ad62b1c Mon Sep 17 00:00:00 2001 From: thekarthikh Date: Thu, 1 Oct 2026 03:26:44 +0530 Subject: [PATCH] feat: allow hiding screencast action titles --- .../microsoft/playwright/options/AnnotatePosition.java | 4 +++- .../java/com/microsoft/playwright/TestScreencast.java | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/playwright/src/main/java/com/microsoft/playwright/options/AnnotatePosition.java b/playwright/src/main/java/com/microsoft/playwright/options/AnnotatePosition.java index 40ed3a516..b7f0d81ba 100644 --- a/playwright/src/main/java/com/microsoft/playwright/options/AnnotatePosition.java +++ b/playwright/src/main/java/com/microsoft/playwright/options/AnnotatePosition.java @@ -17,10 +17,12 @@ package com.microsoft.playwright.options; public enum AnnotatePosition { + /** Hide the action title overlay while keeping the cursor visible. */ + HIDDEN, TOP_LEFT, TOP, TOP_RIGHT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT -} \ No newline at end of file +} diff --git a/playwright/src/test/java/com/microsoft/playwright/TestScreencast.java b/playwright/src/test/java/com/microsoft/playwright/TestScreencast.java index 3a448aedc..c1df74eec 100644 --- a/playwright/src/test/java/com/microsoft/playwright/TestScreencast.java +++ b/playwright/src/test/java/com/microsoft/playwright/TestScreencast.java @@ -228,4 +228,13 @@ void screencastShowActionsShouldAcceptEveryPosition(Page page, Server server) th disposable.close(); } } + + @Test + void screencastShowActionsCanHideTheActionTitle(Page page, Server server) throws Exception { + page.navigate(server.EMPTY_PAGE); + AutoCloseable disposable = page.screencast().showActions( + new Screencast.ShowActionsOptions().setPosition(AnnotatePosition.HIDDEN)); + assertNotNull(disposable); + disposable.close(); + } }