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

Name Type Description Default
value Literal[‘span’, ‘div’] | str The expected container tag. required
timeout Timeout The maximum time to wait for the container tag to appear. Defaults to None. None

expect_height

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

Asserts that the image has the expected height.

Parameters

Name Type Description Default
value StyleValue The expected height. required
timeout Timeout The maximum time to wait for the height to appear. Defaults to None. None

expect_img_alt

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

Asserts that the image has the expected alt text.

Parameters

Name Type Description Default
value AttrValue The expected alt text. required
timeout Timeout The maximum time to wait for the alt text to appear. Defaults to None. None

expect_img_height

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

Asserts that the image has the expected height.

Parameters

Name Type Description Default
value AttrValue The expected height. required
timeout Timeout The maximum time to wait for the height to appear. Defaults to None. None

expect_img_src

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

Asserts that the image has the expected src.

Parameters

Name Type Description Default
value AttrValue The expected src. required
timeout Timeout The maximum time to wait for the src to appear. Defaults to None. None

expect_img_width

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

Asserts that the image has the expected width.

Parameters

Name Type Description Default
value AttrValue The expected width. required
timeout Timeout The maximum time to wait for the width to appear. Defaults to None. None

expect_inline

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

Asserts that the output is inline.

Parameters

Name Type Description Default
value bool Whether the output is inline. False
timeout Timeout The maximum time to wait for the output to appear. Defaults to None. None

expect_width

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

Asserts that the image has the expected width.

Parameters

Name Type Description Default
value StyleValue The expected width. required
timeout Timeout The maximum time to wait for the width to appear. Defaults to None. None