Skip to content

[Bug]: showActions() with ShowActionsOptions.setPosition() throws protocol error for all AnnotatePosition values #1912

@lquartier-work

Description

@lquartier-work

Version

1.59.0

Steps to reproduce

page.screencast().showActions(
new Screencast.ShowActionsOptions().setPosition(AnnotatePosition.TOP_RIGHT)
);

Expected behavior

showActions() runs without error and action indicators are displayed in the screencast at the specified position.

Actual behavior

Actual Behavior

A protocol-level error is thrown for at least TOP and TOP_RIGHT - i haven't tried every single one.

Error

Error: position: expected one of (top-left|top|top-right|bottom-left|bottom|bottom-right)
name='Error
stack='Error: position: expected one of (top-left|top|top-right|bottom-left|bottom|bottom-right)
at .../playwright-java-.../package/lib/protocol/validatorPrimitives.js:156:13
at .../playwright-java-.../package/lib/protocol/validatorPrimitives.js:122:12
at .../playwright-java-.../package/lib/protocol/validatorPrimitives.js:140:21
at DispatcherConnection.dispatch (.../dispatcher.js:264:21)

Additional context

Directly using a String as per the Documentation, like
new Screencast.ShowActionsOptions().setPosition("top-right")
does not work, as the Method Signature doesn't even allow it.

Environment

  • playwright-java version: 1.59.0
  • OS: macOS 14
  • Java version: 17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions