playwright.controller.Chat
playwright.controller.Chat(page, id)
Controller for shiny.express.ui.chat.
Attributes
| expect |
Expectation method equivalent to playwright.expect(self.loc). |
| id |
The browser DOM id of the UI element. |
| loc |
Playwright Locator for the chat. |
| loc_greeting |
Playwright Locator for the chat greeting. |
| loc_input |
Playwright Locator for the chat’s text input. |
| loc_input_button |
Playwright Locator for the chat’s |
| loc_input_container |
Playwright Locator for the chat input container. |
| loc_latest_message |
Playwright Locator for the last message in the chat. |
| loc_messages |
Playwright Locator for the chat messages content container. |
| loc_scroll_container |
Playwright Locator for the scrollable messages container. |
| page |
Playwright Page of the Shiny app. |
Methods
expect_greeting
playwright.controller.Chat.expect_greeting(value, *, timeout=None)
Expects the chat greeting to contain text.
Parameters
| value |
PatternOrStr |
The expected greeting text. |
required |
| timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None. |
None |
expect_latest_message
playwright.controller.Chat.expect_latest_message(value, *, timeout=None)
Expects the last message in the chat.
Parameters
| value |
PatternOrStr |
The expected last message. |
required |
| timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None. |
None |
expect_messages
playwright.controller.Chat.expect_messages(value, *, timeout=None)
Expects the chat messages.
Parameters
| value |
PatternOrStr |
The expected messages. |
required |
| timeout |
Timeout |
The maximum time to wait for the expectation to pass. Defaults to None. |
None |