File tree Expand file tree Collapse file tree
main/java/com/microsoft/playwright/impl
test/java/com/microsoft/playwright Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class Serialization {
4545 .registerTypeAdapter (Date .class , new DateSerializer ())
4646 .registerTypeAdapter (LocalDateTime .class , new LocalDateTimeSerializer ())
4747 .registerTypeAdapter (SameSiteAttribute .class , new SameSiteAdapter ().nullSafe ())
48+ .registerTypeAdapter (AnnotatePosition .class , new ToLowerCaseAndDashSerializer <AnnotatePosition >())
4849 .registerTypeAdapter (BrowserChannel .class , new ToLowerCaseAndDashSerializer <BrowserChannel >())
4950 .registerTypeAdapter (ColorScheme .class , new ToLowerCaseAndDashSerializer <ColorScheme >())
5051 .registerTypeAdapter (Contrast .class , new ToLowerCaseAndDashSerializer <Contrast >())
Original file line number Diff line number Diff line change 1616
1717package com .microsoft .playwright ;
1818
19+ import com .microsoft .playwright .options .AnnotatePosition ;
1920import org .junit .jupiter .api .Test ;
2021import org .junit .jupiter .api .io .TempDir ;
2122
@@ -247,4 +248,21 @@ void screencastShowAndHideActions() throws Exception {
247248 context .close ();
248249 }
249250 }
251+
252+ @ Test
253+ void screencastShowActionsShouldAcceptEveryPosition () throws Exception {
254+ BrowserContext context = browser .newContext ();
255+ Page page = context .newPage ();
256+ try {
257+ page .navigate (server .EMPTY_PAGE );
258+ for (AnnotatePosition position : AnnotatePosition .values ()) {
259+ AutoCloseable disposable = page .screencast ().showActions (
260+ new Screencast .ShowActionsOptions ().setPosition (position ));
261+ assertNotNull (disposable );
262+ disposable .close ();
263+ }
264+ } finally {
265+ context .close ();
266+ }
267+ }
250268}
You can’t perform that action at this time.
0 commit comments