MCPcopy
hub / github.com/streamlit/streamlit / expect_markdown

Function expect_markdown

e2e_playwright/shared/app_utils.py:760–779  ·  view source on GitHub ↗

Expect markdown with the given message to be displayed in the app. Parameters ---------- locator : Locator The locator to search for the exception element. expected_markdown : str or Pattern[str] The expected message to be displayed in the exception.

(
    locator: Locator | Page,
    expected_message: str | re.Pattern[str],
)

Source from the content-addressed store, hash-verified

758
759
760def expect_markdown(
761 locator: Locator | Page,
762 expected_message: str | re.Pattern[str],
763) -> None:
764 """Expect markdown with the given message to be displayed in the app.
765
766 Parameters
767 ----------
768 locator : Locator
769 The locator to search for the exception element.
770
771 expected_markdown : str or Pattern[str]
772 The expected message to be displayed in the exception.
773 """
774 markdown_el = (
775 locator.get_by_test_id("stMarkdown")
776 .get_by_test_id("stMarkdownContainer")
777 .filter(has_text=expected_message)
778 )
779 expect(markdown_el).to_be_visible()
780
781
782def expect_text(

Calls 1

get_by_test_idMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…