playwright.controller.OutputImage

playwright.controller.OutputImage(self, page, id)

Controller for shiny.express.ui.output_image.

Attributes

Name Description
id The ID of the output control.
loc Playwright Locator of the output control.
loc_img Playwright Locator of the image.
page Playwright Page of the Shiny app.

Methods

Name Description
expect_container_tag Asserts that the output has the expected container tag.
expect_height Asserts that the image has the expected height.
expect_img_alt Asserts that the image has the expected alt text.
expect_img_height Asserts that the image has the expected height.
expect_img_src Asserts that the image has the expected src.
expect_img_width Asserts that the image has the expected width.
expect_inline Asserts that the output is inline.
expect_width Asserts that the image has the expected width.

expect_container_tag

playwright.controller.OutputImage.expect_container_tag(value, *, timeout=None)

Asserts that the output has the expected container tag.

Parameters

value: Literal[‘span’, ‘div’] | str

The expected container tag.

timeout: Timeout = None

The maximum time to wait for the container tag to appear. Defaults to None.

expect_height

playwright.controller.OutputImage.expect_height(value, *, timeout=None)

Asserts that the image has the expected height.

Parameters

value: StyleValue

The expected height.

timeout: Timeout = None

The maximum time to wait for the height to appear. Defaults to None.

expect_img_alt

playwright.controller.OutputImage.expect_img_alt(value, *, timeout=None)

Asserts that the image has the expected alt text.

Parameters

value: AttrValue

The expected alt text.

timeout: Timeout = None

The maximum time to wait for the alt text to appear. Defaults to None.

expect_img_height

playwright.controller.OutputImage.expect_img_height(value, *, timeout=None)

Asserts that the image has the expected height.

Parameters

value: AttrValue

The expected height.

timeout: Timeout = None

The maximum time to wait for the height to appear. Defaults to None.

expect_img_src

playwright.controller.OutputImage.expect_img_src(value, *, timeout=None)

Asserts that the image has the expected src.

Parameters

value: AttrValue

The expected src.

timeout: Timeout = None

The maximum time to wait for the src to appear. Defaults to None.

expect_img_width

playwright.controller.OutputImage.expect_img_width(value, *, timeout=None)

Asserts that the image has the expected width.

Parameters

value: AttrValue

The expected width.

timeout: Timeout = None

The maximum time to wait for the width to appear. Defaults to None.

expect_inline

playwright.controller.OutputImage.expect_inline(value=False, *, timeout=None)

Asserts that the output is inline.

Parameters

value: bool = False

Whether the output is inline.

timeout: Timeout = None

The maximum time to wait for the output to appear. Defaults to None.

expect_width

playwright.controller.OutputImage.expect_width(value, *, timeout=None)

Asserts that the image has the expected width.

Parameters

value: StyleValue

The expected width.

timeout: Timeout = None

The maximum time to wait for the width to appear. Defaults to None.